Author: yradtsevich
Date: 2009-04-17 13:51:37 -0400 (Fri, 17 Apr 2009)
New Revision: 14810
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfVerbatim.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandLink.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/test.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandLink.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/message.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/messages.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/verbatim.jsp.xml
trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java
Log:
RESOLVED - issue JBIDE-3690: Incorrect styleClass is applying for the tags, which use
<span> wrapping
https://jira.jboss.org/jira/browse/JBIDE-3690
- style class "vpe-text" has been added to the tags with the incorrect
behavior.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFStatusTemplate.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -17,6 +17,7 @@
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -146,7 +147,7 @@
Attr stopTextAttribute = sourceElement.getAttributeNode(ATTR_STOP_TEXT);
if (stopTextAttribute != null) {
- visualElement = visualDocument.createElement(HTML.TAG_SPAN);
+ visualElement = VisualDomUtil.createBorderlessContainer(visualDocument);
nsIDOMText textNode = visualDocument.createTextNode(
stopTextAttribute.getNodeValue());
visualElement.appendChild(textNode);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -271,7 +271,7 @@
<vpe:tag name="a4j:portlet" case-sensitive="yes">
<vpe:template children="yes" modify="no">
- <span>
+ <span class="vpe-text">
</span>
</vpe:template>
</vpe:tag>
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -14,6 +14,7 @@
import java.util.Map;
import java.util.Set;
+import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMElement;
@@ -25,7 +26,7 @@
*
* @author Sergey Dzmitrovich
*/
-public abstract class AbstractEditableJsfTemplate extends VpeAbstractTemplate {
+public abstract class AbstractEditableJsfTemplate extends VpeAbstractTemplate {
/**
* Gets the output attribute node.
@@ -43,11 +44,11 @@
* Contains JSF attributes and appropriate HTML attributes
* content of that does not have to be modified in templates.
*/
- static final private Map<String, String> attributes = new HashMap<String,
String>();
-
+ static final private Map<String, String> attributes
+ = new HashMap<String, String>();
static {
- attributes.put("style", HTML.ATTR_STYLE); //$NON-NLS-1$
- attributes.put("styleClass", HTML.ATTR_CLASS); //$NON-NLS-1$
+ attributes.put(JSF.ATTR_STYLE, HTML.ATTR_STYLE);
+ attributes.put(JSF.ATTR_STYLE_CLASS, HTML.ATTR_CLASS);
}
/**
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -10,13 +10,13 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
+import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -27,6 +27,16 @@
*
*/
public class JsfOutputTextTemplate extends AbstractOutputJsfTemplate {
+ /**
+ * If at least one of these attributes is present,
+ * {@code sourceNode} should be rendered in {@code SPAN}
+ * visual node.
+ *
+ * @see #isSpanNeeding(Element)
+ */
+ private static final String[] spanMarkers = {
+ JSF.ATTR_STYLE, JSF.ATTR_STYLE_CLASS, JSF.ATTR_ID,
+ JSF.ATTR_DIR, JSF.ATTR_TITLE, JSF.ATTR_LANG};
/*
* (non-Javadoc)
@@ -39,28 +49,46 @@
Element element = (Element) sourceNode;
- // create span element
- nsIDOMElement span = VisualDomUtil.createBorderlessContainer(visualDocument);
+ // create container
+ final nsIDOMElement container;
+ if (isSpanNeeding(element)) {
+ container = visualDocument.createElement(HTML.TAG_SPAN);
+ } else {
+ container = VisualDomUtil.createBorderlessContainer(visualDocument);
+ }
// creation data
- VpeCreationData creationData = new VpeCreationData(span);
+ VpeCreationData creationData = new VpeCreationData(container);
// copy attributes
- copyOutputJsfAttributes(span, element);
+ copyOutputJsfAttributes(container, element);
- processOutputAttribute(pageContext, visualDocument, element, span,
+ processOutputAttribute(pageContext, visualDocument, element, container,
creationData);
return creationData;
}
+ /**
+ * Returns {@code true} if given {@code element} should be
+ * rendered in {@code SPAN} tag, otherwise returns {@code false}.
+ *
+ * @see #spanMarkers
+ */
+ private boolean isSpanNeeding(Element element) {
+ for (String spanMarker : spanMarkers) {
+ if (element.hasAttribute(spanMarker)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
@Override
public boolean recreateAtAttrChange(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
nsIDOMElement visualNode, Object data, String name, String value) {
-
return true;
}
-
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfVerbatim.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfVerbatim.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfVerbatim.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -19,6 +19,7 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.NodesManagingUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -34,10 +35,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools
- * .vpe.editor.context.VpePageContext, org.w3c.dom.Node,
- * org.mozilla.interfaces.nsIDOMDocument)
+ * @see org.jboss.tools.vpe.editor.template.VpeTemplate
+ * #create(VpePageContext, Node, nsIDOMDocument)
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
@@ -45,13 +44,14 @@
Element element = (Element) sourceNode;
// create span
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement mainContainer = VisualDomUtil
+ .createBorderlessContainer(visualDocument);
// get children
NodeList list = element.getChildNodes();
// creation data
- VpeCreationData creationData = new VpeCreationData(span);
+ VpeCreationData creationData = new VpeCreationData(mainContainer);
// for each child
for (int i = 0; i < list.getLength(); i++) {
@@ -59,25 +59,25 @@
Node child = list.item(i);
// create span for child
- nsIDOMElement childSpan = visualDocument
- .createElement(HTML.TAG_SPAN);
- span.appendChild(childSpan);
+ nsIDOMElement childContainer = VisualDomUtil
+ .createBorderlessContainer(visualDocument);
+ mainContainer.appendChild(childContainer);
// if child is text or not html tag
- if ((child.getNodeType() == Node.ELEMENT_NODE && child.getPrefix() != null)
- || (child.getNodeType() == Node.TEXT_NODE)) {
+ if ((child.getNodeType() == Node.ELEMENT_NODE
+ && child.getPrefix() != null)
+ || child.getNodeType() == Node.TEXT_NODE) {
// create children info and add to creationData
- VpeChildrenInfo childSpanInfo = new VpeChildrenInfo(childSpan);
+ VpeChildrenInfo childSpanInfo = new VpeChildrenInfo(childContainer);
childSpanInfo.addSourceChild(child);
creationData.addChildrenInfo(childSpanInfo);
-
} else {
// get text by positions and add to span
String text = NodesManagingUtil.getSourceText(pageContext,
((IDOMNode) child).getStartOffset(), ((IDOMNode) child)
.getEndOffset() - 1);
- span.appendChild(visualDocument.createTextNode(text));
+ mainContainer.appendChild(visualDocument.createTextNode(text));
}
}
@@ -97,16 +97,13 @@
/*
* (non-Javadoc)
*
- * @seeorg.jboss.tools.vpe.editor.template.VpeAbstractTemplate#
- * isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext,
- * org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument,
- * org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String,
- * java.lang.String)
+ * @see VpeAbstractTemplate#isRecreateAtAttrChange(
+ * VpePageContext, Element, nsIDOMDocument,
+ * nsIDOMElement, Object, String, String)
*/
public boolean recreateAtAttrChange(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
nsIDOMElement visualNode, Object data, String name, String value) {
return true;
}
-
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -57,6 +57,10 @@
public static final String ATTR_ITEM_DISABLED = "itemDisabled"; //$NON-NLS-1$
- public static final String ATTR_LAYOUT = "layout";//$NON-NLS-1$
+ public static final String ATTR_LAYOUT = "layout"; //$NON-NLS-1$
+ public static final String ATTR_TITLE = "title"; //$NON-NLS-1$
+
+ public static final String ATTR_LANG = "lang"; //$NON-NLS-1$
+
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -22,7 +22,7 @@
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
- <span title="{tagstring()}" />
+ <span title="{tagstring()}" class="vpe-text"/>
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="yes" />
@@ -609,10 +609,17 @@
<vpe:breaker type="ignore" />
</vpe:template>
</vpe:if>
+ <vpe:if
test="attrpresent('style')|attrpresent('styleClass')|attrpresent('id')">
+ <vpe:template children="yes" modify="yes">
+ <span style="{@style}" class="{@styleClass}"
+ title="{tagstring()}" />
+ <vpe:breaker type="ignore" />
+ </vpe:template>
+ </vpe:if>
<vpe:template children="yes" modify="yes">
- <span style="{@style}" class="{@styleClass}"
- title="{tagstring()}" />
- <vpe:breaker type="ignore" />
+ <span class="vpe-text"
+ title="{tagstring()}" />
+ <vpe:breaker type="ignore" />
</vpe:template>
</vpe:tag>
@@ -819,9 +826,9 @@
<vpe:tag name="h:message">
<vpe:template children="no" modify="no">
- <span class="{@styleClass}" style="{@style}">
- Error Message
- </span>
+ <ul class="{@styleClass}" style="{@style}">
+ <li>Error Message</li>
+ </ul>
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
@@ -833,9 +840,9 @@
<vpe:tag name="h:messages">
<vpe:template children="no" modify="no">
- <span class="{@styleClass}" style="{@style}">
- Error Messages
- </span>
+ <ul class="{@styleClass}" style="{@style}">
+ <li>Error Messages</li>
+ </ul>
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -20,6 +20,7 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -406,11 +407,12 @@
Element sourceElement = (Element) sourceNode;
String nodes = sourceElement
.getAttribute(RichFacesRecursiveTreeNodesAdaptorTemplate.NODES_NAME);
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement textContainer = VisualDomUtil
+ .createBorderlessContainer(visualDocument);
nsIDOMText text = visualDocument
.createTextNode((nodes == null) ? Constants.EMPTY : nodes);
- span.appendChild(text);
- nodeTitle.appendChild(span);
+ textContainer.appendChild(text);
+ nodeTitle.appendChild(textContainer);
} else {
VpeChildrenInfo tdInfo = new VpeChildrenInfo(nodeTitle);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -47,7 +47,7 @@
ArrayList<Element> columns = getColumns(sourceElement);
int columnsLength = getColumnsCount(sourceElement, columns);
nsIDOMElement colgroup = visualDocument.createElement(HTML.TAG_COLGROUP);
- colgroup.setAttribute(HTML.TAG_SPAN, String.valueOf(columnsLength));
+ colgroup.setAttribute(HTML.ATTR_SPAN, String.valueOf(columnsLength));
table.appendChild(colgroup);
String columnsWidth = sourceElement.getAttribute(RichFaces.ATTR_COLUMNS_WIDTH);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -26,183 +26,200 @@
public class RichFacesMessagesTemplate extends RichFacesMessageTemplate {
- private static final String LAYOUT = "layout"; //$NON-NLS-1$
- private static final String LIST = "list"; //$NON-NLS-1$
- private static final String TABLE = "table"; //$NON-NLS-1$
- private static final String ITERATOR = "iterator"; //$NON-NLS-1$
-
- private static final String CSS_RICH_MESSAGES = "rich-messages";
//$NON-NLS-1$
- private static final String CSS_RICH_MESSAGES_MARKER =
"rich-messages-marker"; //$NON-NLS-1$
- private static final String CSS_RICH_MESSAGES_LABEL =
"rich-messages-label"; //$NON-NLS-1$
-
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ private static final String LAYOUT = "layout"; //$NON-NLS-1$
+ private static final String TABLE = "table"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES
+ = "rich-messages"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES_MARKER
+ = "rich-messages-marker"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES_LABEL
+ = "rich-messages-label"; //$NON-NLS-1$
+
+ @Override
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
- VpeCreationData creationData = null;
- Element sourceElement = (Element) sourceNode;
- final Attributes attrs = new Attributes(sourceElement);
- String styleClass = CSS_RICH_MESSAGES;
- String layout = ((Element) sourceNode).getAttribute(LAYOUT);
- nsIDOMElement container = null;
- if (TABLE.equalsIgnoreCase(layout)) {
- container = visualDocument.createElement(HTML.TAG_TABLE);
- container.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
- container.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
- } else {
- /*
- * If layout is either list or iterator or not specified
- * use list layout by default.
- */
- container = visualDocument.createElement(HTML.TAG_DL);
- }
+ VpeCreationData creationData = null;
+ final Element sourceElement = (Element) sourceNode;
+ final Attributes attrs = new Attributes(sourceElement);
+ String styleClass = CSS_RICH_MESSAGES;
+ final String layout = ((Element) sourceNode).getAttribute(LAYOUT);
- if (ComponentUtil.isNotBlank(attrs.getStyleValue())) {
- container.setAttribute(HTML.ATTR_STYLE, attrs.getStyleValue());
- }
- if (ComponentUtil.isNotBlank(attrs.getStyleClassValue())) {
- styleClass += Constants.WHITE_SPACE + attrs.getStyleClassValue();
- }
- container.setAttribute(HTML.ATTR_CLASS, styleClass);
+ final nsIDOMElement container;
+ if (TABLE.equalsIgnoreCase(layout)) {
+ container = visualDocument.createElement(HTML.TAG_TABLE);
+ container.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
+ container.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
+ } else {
+ /*
+ * If layout is either list or iterator or not specified
+ * use list layout by default.
+ */
+ container = visualDocument.createElement(HTML.TAG_DL);
+ }
- creationData = new VpeCreationData(container);
-
- HashMap<String, Node> facets = getFacelets((Element) sourceNode);
-
- for (int i = 0; i < markers.length; i++) {
- if (facets.containsKey(markers[i])) {
- container.appendChild(createVisualMessage(creationData,
- visualDocument, layout, i, (Element) facets.get(markers[i]), attrs));
- } else {
- container.appendChild(createVisualMessage(creationData,
- visualDocument, layout, i, null, attrs));
- }
- }
- return creationData;
+ if (ComponentUtil.isNotBlank(attrs.getStyleValue())) {
+ container.setAttribute(HTML.ATTR_STYLE, attrs.getStyleValue());
+ }
+ if (ComponentUtil.isNotBlank(attrs.getStyleClassValue())) {
+ styleClass += Constants.WHITE_SPACE + attrs.getStyleClassValue();
+ }
+ container.setAttribute(HTML.ATTR_CLASS, styleClass);
+
+ creationData = new VpeCreationData(container);
+
+ final HashMap<String, Node> facets = getFacelets((Element) sourceNode);
+
+ for (int i = 0; i < markers.length; i++) {
+ if (facets.containsKey(markers[i])) {
+ container.appendChild(createVisualMessage(creationData,
+ visualDocument, layout, i,
+ (Element) facets.get(markers[i]), attrs));
+ } else {
+ container.appendChild(createVisualMessage(creationData,
+ visualDocument, layout, i, null, attrs));
+ }
+ }
+ return creationData;
}
/**
* Method for creating rich:message template if rich:message has facets
- *
+ *
* @param visualDocument
* @param sourceElement
* @param facets
* @return
*/
private nsIDOMElement createVisualMessage(VpeCreationData creationData,
- nsIDOMDocument visualDocument, String layout, int markerNum,
- Element facet, Attributes attrs) {
+ nsIDOMDocument visualDocument, String layout, int markerNum,
+ Element facet, Attributes attrs) {
- String containerClass = Constants.EMPTY;
- String markerClass = CSS_RICH_MESSAGES_MARKER;
- String labelClass = CSS_RICH_MESSAGES_LABEL;
+ String containerClass = Constants.EMPTY;
+ String markerClass = CSS_RICH_MESSAGES_MARKER;
+ String labelClass = CSS_RICH_MESSAGES_LABEL;
- String labelMessage = Constants.EMPTY;
- nsIDOMElement topContainer = null;
- nsIDOMElement container = null;
- nsIDOMElement marker = null;
- nsIDOMElement label = null;
-
- if (TABLE.equalsIgnoreCase(layout)) {
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- container = visualDocument.createElement(HTML.TAG_TD);
- marker = visualDocument.createElement(HTML.TAG_SPAN);
- label = visualDocument.createElement(HTML.TAG_SPAN);
- tr.appendChild(container);
- container.appendChild(marker);
- container.appendChild(label);
- topContainer = tr;
- } else {
- /*
- * If layout is either list or iterator or not specified use list
- * layout by default.
- */
- container = visualDocument.createElement(HTML.TAG_DT);
- marker = visualDocument.createElement(HTML.TAG_SPAN);
- label = visualDocument.createElement(HTML.TAG_SPAN);
- container.appendChild(marker);
- container.appendChild(label);
- topContainer = container;
- }
-
- if (facet != null) {
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(marker);
- creationData.addChildrenInfo(childrenInfo);
- childrenInfo.addSourceChild(facet);
- }
- /*
- * apply styles and classes
- */
- switch (markerNum) {
- case 0: // passed
- labelMessage = (attrs.getPassedLabelValue()== null) ? Constants.EMPTY :
attrs.getPassedLabelValue();
- if (ComponentUtil.isNotBlank(attrs.getMarkerClassValue())) {
- markerClass += Constants.WHITE_SPACE + attrs.getMarkerClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getLabelClassValue())) {
- labelClass += Constants.WHITE_SPACE + attrs.getLabelClassValue();
- }
- break;
- case 1: // error
- labelMessage = ERROR_MESSAGE;
- if (ComponentUtil.isNotBlank(attrs.getErrorClassValue())) {
- containerClass += Constants.WHITE_SPACE + attrs.getErrorClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getErrorMarkerClassValue())) {
- markerClass += Constants.WHITE_SPACE + attrs.getErrorMarkerClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getErrorLabelClassValue())) {
- labelClass += Constants.WHITE_SPACE + attrs.getErrorLabelClassValue();
- }
- break;
- case 2: // fatal
- labelMessage = FATAL_MESSAGE;
- if (ComponentUtil.isNotBlank(attrs.getFatalClassValue())) {
- containerClass += Constants.WHITE_SPACE + attrs.getFatalClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getFatalMarkerClassValue())) {
- markerClass += Constants.WHITE_SPACE + attrs.getFatalMarkerClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getFatalLabelClassValue())) {
- labelClass += Constants.WHITE_SPACE + attrs.getFatalLabelClassValue();
- }
- break;
- case 3: // info
- labelMessage = INFO_MESSAGE;
- if (ComponentUtil.isNotBlank(attrs.getInfoClassValue())) {
- containerClass += Constants.WHITE_SPACE + attrs.getInfoClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getInfoMarkerClassValue())) {
- markerClass += Constants.WHITE_SPACE + attrs.getInfoMarkerClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getInfoLabelClassValue())) {
- labelClass += Constants.WHITE_SPACE + attrs.getInfoLabelClassValue();
- }
- break;
- case 4: // warn
- labelMessage = WARNING_MESSAGE;
- if (ComponentUtil.isNotBlank(attrs.getWarnClassValue())) {
- containerClass += Constants.WHITE_SPACE + attrs.getWarnClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getWarnMarkerClassValue())) {
- markerClass += Constants.WHITE_SPACE + attrs.getWarnMarkerClassValue();
- }
- if (ComponentUtil.isNotBlank(attrs.getWarnLabelClassValue())) {
- labelClass += Constants.WHITE_SPACE + attrs.getWarnLabelClassValue();
- }
- break;
- default:
- break;
- }
-
- if (ComponentUtil.isNotBlank(containerClass)) {
- container.setAttribute(HTML.ATTR_CLASS, containerClass);
- }
- marker.setAttribute(HTML.ATTR_CLASS, markerClass);
- label.setAttribute(HTML.ATTR_CLASS, labelClass);
-
- nsIDOMText text = visualDocument.createTextNode(labelMessage);
- label.appendChild(text);
- return topContainer;
+ final String labelMessage;
+ final nsIDOMElement topContainer;
+ final nsIDOMElement container;
+ final nsIDOMElement marker = visualDocument
+ .createElement(HTML.TAG_SPAN);
+ final nsIDOMElement label = visualDocument
+ .createElement(HTML.TAG_SPAN);
+
+ if (TABLE.equalsIgnoreCase(layout)) {
+ final nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
+ container = visualDocument.createElement(HTML.TAG_TD);
+ tr.appendChild(container);
+ container.appendChild(marker);
+ container.appendChild(label);
+ topContainer = tr;
+ } else {
+ /*
+ * If layout is either list or iterator or not specified use list
+ * layout by default.
+ */
+ container = visualDocument.createElement(HTML.TAG_DT);
+ container.appendChild(marker);
+ container.appendChild(label);
+ topContainer = container;
+ }
+
+ if (facet != null) {
+ final VpeChildrenInfo childrenInfo = new VpeChildrenInfo(marker);
+ creationData.addChildrenInfo(childrenInfo);
+ childrenInfo.addSourceChild(facet);
+ }
+ /*
+ * apply styles and classes
+ */
+ switch (markerNum) {
+ case 0: // passed
+ labelMessage = (attrs.getPassedLabelValue() == null)
+ ? Constants.EMPTY
+ : attrs.getPassedLabelValue();
+ if (ComponentUtil.isNotBlank(attrs.getMarkerClassValue())) {
+ markerClass += Constants.WHITE_SPACE
+ + attrs.getMarkerClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getLabelClassValue())) {
+ labelClass += Constants.WHITE_SPACE
+ + attrs.getLabelClassValue();
+ }
+ break;
+ case 1: // error
+ labelMessage = ERROR_MESSAGE;
+ if (ComponentUtil.isNotBlank(attrs.getErrorClassValue())) {
+ containerClass += Constants.WHITE_SPACE
+ + attrs.getErrorClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getErrorMarkerClassValue())) {
+ markerClass += Constants.WHITE_SPACE
+ + attrs.getErrorMarkerClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getErrorLabelClassValue())) {
+ labelClass += Constants.WHITE_SPACE
+ + attrs.getErrorLabelClassValue();
+ }
+ break;
+ case 2: // fatal
+ labelMessage = FATAL_MESSAGE;
+ if (ComponentUtil.isNotBlank(attrs.getFatalClassValue())) {
+ containerClass += Constants.WHITE_SPACE
+ + attrs.getFatalClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getFatalMarkerClassValue())) {
+ markerClass += Constants.WHITE_SPACE
+ + attrs.getFatalMarkerClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getFatalLabelClassValue())) {
+ labelClass += Constants.WHITE_SPACE
+ + attrs.getFatalLabelClassValue();
+ }
+ break;
+ case 3: // info
+ labelMessage = INFO_MESSAGE;
+ if (ComponentUtil.isNotBlank(attrs.getInfoClassValue())) {
+ containerClass += Constants.WHITE_SPACE
+ + attrs.getInfoClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getInfoMarkerClassValue())) {
+ markerClass += Constants.WHITE_SPACE
+ + attrs.getInfoMarkerClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getInfoLabelClassValue())) {
+ labelClass += Constants.WHITE_SPACE
+ + attrs.getInfoLabelClassValue();
+ }
+ break;
+ case 4: // warn
+ labelMessage = WARNING_MESSAGE;
+ if (ComponentUtil.isNotBlank(attrs.getWarnClassValue())) {
+ containerClass += Constants.WHITE_SPACE
+ + attrs.getWarnClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getWarnMarkerClassValue())) {
+ markerClass += Constants.WHITE_SPACE
+ + attrs.getWarnMarkerClassValue();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getWarnLabelClassValue())) {
+ labelClass += Constants.WHITE_SPACE
+ + attrs.getWarnLabelClassValue();
+ }
+ break;
+ default:
+ labelMessage = Constants.EMPTY;
+ break;
+ }
+
+ if (ComponentUtil.isNotBlank(containerClass)) {
+ container.setAttribute(HTML.ATTR_CLASS, containerClass);
+ }
+ marker.setAttribute(HTML.ATTR_CLASS, markerClass);
+ label.setAttribute(HTML.ATTR_CLASS, labelClass);
+
+ final nsIDOMText text = visualDocument.createTextNode(labelMessage);
+ label.appendChild(text);
+ return topContainer;
}
-
-}
\ No newline at end of file
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -126,8 +126,8 @@
int columnsLength = getColumnsCount(sourceElement, columns);
nsIDOMElement colgroup = visualDocument
.createElement(HTML.TAG_COLGROUP);
- colgroup.setAttribute(HTML.TAG_SPAN, String
- .valueOf(columnsLength));
+ colgroup.setAttribute(HTML.ATTR_SPAN,
+ String.valueOf(columnsLength));
mainTable.appendChild(colgroup);
// Encode Caption
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandLink.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandLink.xhtml.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/commandLink.xhtml.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,12 +1,8 @@
<tests>
<test id="commandLink1">
- <A DIR="" STYLE="-moz-user-modify: read-write;">
- <SPAN>Say Hello</SPAN>
- </A>
+ <A><SPAN CLASS="vpe-text">Say Hello</SPAN></A>
</test>
<test id="commandLink2">
- <A DIR="" STYLE="-moz-user-modify: read-write;">
- <SPAN>Link</SPAN>
- </A>
+ <A><SPAN CLASS="vpe-text">Link</SPAN></A>
</test>
-</tests>
\ No newline at end of file
+</tests>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,7 +1,5 @@
<tests>
<test id="htmlCommandLink">
- <A DIR="" STYLE="-moz-user-modify: read-write;">
- <SPAN>value</SPAN>
- </A>
+ <A><SPAN CLASS="vpe-text">value</SPAN></A>
</test>
-</tests>
\ No newline at end of file
+</tests>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,7 +1,7 @@
<tests>
<test id="portlet">
- <SPAN STYLE="-moz-user-modify: read-only;">
- <SPAN> ....</SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text"> ....</SPAN>
</SPAN>
</test>
</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,14 +1,14 @@
<tests>
<test id="status1">
- <SPAN CLASS="" STYLE="">
- <SPAN>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
Complete
</SPAN>
</SPAN>
</test>
<test id="status2">
<SPAN CLASS="StyleClass StopStyleClass" STYLE="border: 3px solid
red;">
- <SPAN>
+ <SPAN CLASS="vpe-text">
FACET STOP OUTPUT TEXT
</SPAN>
</SPAN>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/test.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/test.xhtml.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/test.xhtml.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,29 +1,30 @@
<tests>
<test id="test_el">
-<FORM
- STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
- <SPAN CLASS="message" STYLE="-moz-user-modify: read-only;">
- Error Messages
-</SPAN>
- <DIV CLASS="dr-pnl rich-panel" STYLE="">
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN>
- 123456789 Test El expression Test El expression Test El expression
-</SPAN>
- <DIV
- STYLE="width: 109px; height: 106px; background-color: green; -moz-user-modify:
read-write;">
- <BR VPE:PSEUDO-ELEMENT="yes"
- STYLE="font-style: italic; color: green; -moz-user-modify:
read-only;">
- </BR>
+ <FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
+ <UL CLASS="message" STYLE="-moz-user-modify: read-only;">
+ <LI>
+ Error Messages
+ </LI>
+ </UL>
+ <DIV CLASS="dr-pnl rich-panel" STYLE="">
+ <DIV CLASS="dr-pnl-b rich-panel-body">
+ <SPAN CLASS="vpe-text">
+ 123456789 Test El expression Test El expression Test El expression
+ </SPAN>
+ <DIV
+ STYLE="width: 109px; height: 106px; background-color: green; -moz-user-modify:
read-write;">
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;"
/>
+
+ </DIV>
+ <SPAN CLASS="vpe-text">
+ Hello
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Name: Test El expression
+ </SPAN>
+ </DIV>
</DIV>
- <SPAN>
- Hello
-</SPAN>
- <SPAN>
- Name: Test El expression
-</SPAN>
- </DIV>
- </DIV>
-</FORM>
-</test>
+ </FORM>
+ </test>
</tests>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandLink.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandLink.jsp.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/commandLink.jsp.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,16 +1,16 @@
<tests>
<test id="commandLink1">
- <span>commandLink1</span>
+ <span CLASS="vpe-text">commandLink1</span>
</test>
<test id="commandLink2">
<a>commandLink2</a>
</test>
<test id="commandLink3">
- <SPAN >
- <SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
commandLink3
</SPAN>
- <SPAN>
+ <SPAN CLASS="vpe-text">
: This link is disabled as it is not nested within a JSF form.
</SPAN>
</SPAN>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/message.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/message.jsp.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/message.jsp.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,5 +1,9 @@
<tests>
<test id="message">
- <span> Error Message</span>
+ <UL>
+ <LI>
+ Error Message
+ </LI>
+ </UL>
</test>
</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/messages.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/messages.jsp.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/messages.jsp.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,5 +1,9 @@
<tests>
<test id="messages">
- <span> Error Messages </span>
+ <UL>
+ <LI>
+ Error Messages
+ </LI>
+ </UL>
</test>
</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp 2009-04-17
17:51:37 UTC (rev 14810)
@@ -3,16 +3,30 @@
<html>
<head>
+<style type="text/css">
+ span {
+ color: yellow;
+ background-color: green;
+ }
+</style>
</head>
<body>
<f:view>
- <h1><h:outputText value="outputText" /></h1>
-
+ <div id="outputText0">
+ <h:outputText value="outputText0"/>
+ </div>
<h:outputText value="outputText1" id="outputText1" />
<h:outputText value="outputText2" id="outputText2"
escape="true" />
<h:outputText value="outputText3" id="outputText3"
escape="false" />
-
+ <div id="outputTextGroup">
+ <h:outputText value="outputText4 " id="outputText"/>
+ <h:outputText value="outputText5 " dir="LTR"/>
+ <h:outputText value="outputText6 " lang="java"/>
+ <h:outputText value="outputText7 " style="style"/>
+ <h:outputText value="outputText8 " styleClass="styleClass"/>
+ <h:outputText value="outputText9 " title="title"/>
+ </div>
</f:view>
</body>
</html>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/outputText.jsp.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,13 +1,48 @@
<tests>
+ <test id="outputText0">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ outputText0
+ </SPAN>
+ </DIV>
+ </test>
<test id="outputText1">
- <SPAN> outputText1</SPAN>
+ <SPAN>
+ outputText1
+ </SPAN>
</test>
<test id="outputText2">
- <SPAN> outputText2</SPAN>
+ <SPAN>
+ outputText2
+ </SPAN>
</test>
<test id="outputText3">
<SPAN>
- <SPAN> outputText3</SPAN>
+ <SPAN CLASS="vpe-text">
+ outputText3
+ </SPAN>
</SPAN>
</test>
-</tests>
\ No newline at end of file
+ <test id="outputTextGroup">
+ <DIV>
+ <SPAN>
+ outputText4
+ </SPAN>
+ <SPAN>
+ outputText5
+ </SPAN>
+ <SPAN>
+ outputText6
+ </SPAN>
+ <SPAN STYLE="">
+ outputText7
+ </SPAN>
+ <SPAN CLASS="styleClass">
+ outputText8
+ </SPAN>
+ <SPAN>
+ outputText9
+ </SPAN>
+ </DIV>
+ </test>
+</tests>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp 2009-04-17
17:51:37 UTC (rev 14810)
@@ -3,6 +3,12 @@
<html>
<head>
+<style type="text/css">
+ span {
+ color: yellow;
+ background-color: green;
+ }
+</style>
</head>
<body>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGroup.jsp.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,14 +1,22 @@
<tests>
<test id="panelGroup1">
<SPAN>
- <SPAN> 1</SPAN>
- <SPAN> 2</SPAN>
+ <SPAN CLASS="vpe-text">
+ 1
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ 2
+ </SPAN>
</SPAN>
</test>
<test id="panelGroup2">
<DIV>
- <SPAN> 3</SPAN>
- <SPAN> 4</SPAN>
+ <SPAN CLASS="vpe-text">
+ 3
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ 4
+ </SPAN>
</DIV>
</test>
</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/verbatim.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/verbatim.jsp.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/verbatim.jsp.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -1,18 +1,25 @@
<tests>
<test id="verbatim1">
- <SPAN>
- <INPUT TYPE="button" VALUE="button" />
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="button" VALUE="button"/>
</SPAN>
</test>
<test id="verbatim2">
- <SPAN>
- <SPAN></SPAN>
- <SPAN></SPAN>
- <input type="button" value="button" />
- <SPAN></SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <input type="button" value="button" />
+ <SPAN CLASS="vpe-text">
+ </SPAN>
</SPAN>
</test>
<test id="verbatim3">
- <SPAN><SPAN></SPAN><input type="button"
value="button" /></SPAN>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <input type="button" value="button" />
+ </SPAN>
</test>
</tests>
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java 2009-04-17
17:43:55 UTC (rev 14809)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java 2009-04-17
17:51:37 UTC (rev 14810)
@@ -20,6 +20,7 @@
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionException;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionInfo;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -138,10 +139,11 @@
if (valueExpr != null) {
String value = valueExpr.exec(pageContext, sourceNode).stringValue();
if (value != null && value.length() > 0) {
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
- a.appendChild(span);
+ nsIDOMElement textContainer = VisualDomUtil
+ .createBorderlessContainer(visualDocument);
+ a.appendChild(textContainer);
nsIDOMText text = visualDocument.createTextNode(value);
- span.appendChild(text);
+ textContainer.appendChild(text);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml 2009-04-17
17:43:55 UTC (rev 14809)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.jsp/templates/vpe-templates-jsp.xml 2009-04-17
17:51:37 UTC (rev 14810)
@@ -141,7 +141,7 @@
<vpe:tag name="jsp:text" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
- <span/>
+ <span class="vpe-text"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
<vpe:drop container="no"/>