Author: sdzmitrovich
Date: 2008-02-26 13:03:18 -0500 (Tue, 26 Feb 2008)
New Revision: 6582
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.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/util/NodeProxyUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1718
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractJsfTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractJsfTemplate.java 2008-02-26
16:59:09 UTC (rev 6581)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractJsfTemplate.java 2008-02-26
18:03:18 UTC (rev 6582)
@@ -47,11 +47,29 @@
Set<String> jsfAttributes = attributes.keySet();
for (String key : jsfAttributes) {
- if (sourceElement.hasAttribute(key))
- visualElement.setAttribute(attributes.get(key), sourceElement
- .getAttribute(key));
+
+ copyAttribute(visualElement, sourceElement, key, attributes
+ .get(key));
}
}
+ /**
+ * copy attribute
+ *
+ * @param visualElement
+ * @param sourceElement
+ * @param sourceAttributeName
+ * @param targetAtttributeName
+ */
+ protected void copyAttribute(nsIDOMElement visualElement,
+ Element sourceElement, String sourceAttributeName,
+ String targetAtttributeName) {
+
+ if (sourceElement.hasAttribute(sourceAttributeName))
+ visualElement.setAttribute(targetAtttributeName, sourceElement
+ .getAttribute(sourceAttributeName));
+
+ }
+
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.java 2008-02-26
16:59:09 UTC (rev 6581)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputLabelTemplate.java 2008-02-26
18:03:18 UTC (rev 6582)
@@ -13,9 +13,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.jboss.tools.jsf.vpe.jsf.template.util.NodeProxyUtil;
-import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
@@ -32,26 +30,16 @@
/**
* @author Sergey Dzmitrovich
*
- * template for <h:outputText .../> jsf tag
+ * template for <h:outputLabel .../> jsf tag
*
*/
-public class JsfOutputLabelTemplate extends AbstractJsfTemplate {
+public class JsfOutputLabelTemplate extends AbstractOutputJsfTemplate {
/**
- * name of "value" attribute
+ * name of "for" attribute
*/
- private static final String VALUE_ATTR_NAME = "value";
+ protected static final String FOR_ATTR_NAME = "for";
- /**
- * name of "binding" attribute
- */
- private static final String BINDING_ATTR_NAME = "binding";
-
- /**
- * name of "escape" attribute
- */
- private static final String ESCAPE_ATTR_NAME = "escape";
-
/*
* (non-Javadoc)
*
@@ -65,24 +53,35 @@
List<VpeNodeMapping> attributesMapping = new ArrayList<VpeNodeMapping>();
- // create span element
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ // create label element
+ nsIDOMElement label = visualDocument.createElement(HTML.TAG_LABEL);
- VpeCreationData creationData = new VpeCreationData(span);
+ // copy attributes
+ copyOutputJsfAttributes(label, element);
+ copyAttribute(label, element, FOR_ATTR_NAME, HTML.ATTR_FOR);
- copyGeneralJsfAttributes(span, element);
+ // creation data
+ VpeCreationData creationData = new VpeCreationData(label);
+ // get attribute to represent
Attr attr = getOutputAttributeNode(element);
if (attr != null) {
- if ("true".equalsIgnoreCase(element.getAttribute(ESCAPE_ATTR_NAME))) {
+ // if escape then contents of value (or other attribute) is only
+ // text
+ if (!element.hasAttribute(ESCAPE_ATTR_NAME)
+ || ("true".equalsIgnoreCase(element
+ .getAttribute(ESCAPE_ATTR_NAME)))) {
String value = attr.getNodeValue();
+ // get bundle value
String bundleValue = getBundleValue(pageContext, attr);
nsIDOMText text;
+ // if bundleValue differ from value then will be represent
+ // bundleValue, but text will be not edit
if (!value.equals(bundleValue)) {
text = visualDocument.createTextNode(bundleValue);
@@ -90,15 +89,21 @@
} else {
text = visualDocument.createTextNode(value);
+ // add attribute for ability of editing
attributesMapping.add(new VpeNodeMapping(attr, text));
}
- span.appendChild(text);
- } else {
+ label.appendChild(text);
+ }
+ // then text can be html code
+ else {
- VpeChildrenInfo spanInfo = new VpeChildrenInfo(span);
+ // create info
+ VpeChildrenInfo spanInfo = new VpeChildrenInfo(label);
+ // reparse attribute's value
NodeList list = NodeProxyUtil.reparseAttributeValue(attr);
+ // add children to info
for (int i = 0; i < list.getLength(); i++) {
Node child = list.item(i);
@@ -106,6 +111,7 @@
spanInfo.addSourceChild(child);
}
+ // add info to creation data
creationData.addChildrenInfo(spanInfo);
}
@@ -126,24 +132,4 @@
return true;
}
- private Attr getOutputAttributeNode(Element element) {
-
- if (element.hasAttribute(VALUE_ATTR_NAME))
- return element.getAttributeNode(VALUE_ATTR_NAME);
- else if (element.hasAttribute(BINDING_ATTR_NAME))
- return element.getAttributeNode(BINDING_ATTR_NAME);
-
- return null;
-
- }
-
- private String getBundleValue(VpePageContext pageContext, Attr attr) {
-
- BundleMap bundle = pageContext.getBundle();
-
- return bundle.getBundleValue(attr.getNodeValue(), ((IDOMAttr) attr)
- .getValueRegionStartOffset());
-
- }
-
}
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 2008-02-26
16:59:09 UTC (rev 6581)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java 2008-02-26
18:03:18 UTC (rev 6582)
@@ -13,9 +13,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.jboss.tools.jsf.vpe.jsf.template.util.NodeProxyUtil;
-import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
@@ -35,23 +33,8 @@
* template for <h:outputText .../> jsf tag
*
*/
-public class JsfOutputTextTemplate extends AbstractJsfTemplate {
+public class JsfOutputTextTemplate extends AbstractOutputJsfTemplate {
- /**
- * name of "value" attribute
- */
- private static final String VALUE_ATTR_NAME = "value";
-
- /**
- * name of "binding" attribute
- */
- private static final String BINDING_ATTR_NAME = "binding";
-
- /**
- * name of "escape" attribute
- */
- private static final String ESCAPE_ATTR_NAME = "escape";
-
/*
* (non-Javadoc)
*
@@ -68,21 +51,30 @@
// create span element
nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ // creation data
VpeCreationData creationData = new VpeCreationData(span);
- copyGeneralJsfAttributes(span, element);
+ // copy attributes
+ copyOutputJsfAttributes(span, element);
+ // get attribute to represent
Attr attr = getOutputAttributeNode(element);
if (attr != null) {
+ // if escape then contents of value (or other attribute) is only
+ // text
+ if (!element.hasAttribute(ESCAPE_ATTR_NAME)
+ || "true".equalsIgnoreCase(element
+ .getAttribute(ESCAPE_ATTR_NAME))) {
- if (!element.hasAttribute(ESCAPE_ATTR_NAME) ||
"true".equalsIgnoreCase(element.getAttribute(ESCAPE_ATTR_NAME))) {
-
String value = attr.getNodeValue();
+ // get bundle value
String bundleValue = getBundleValue(pageContext, attr);
nsIDOMText text;
+ // if bundleValue differ from value then will be represent
+ // bundleValue, but text will be not edit
if (!value.equals(bundleValue)) {
text = visualDocument.createTextNode(bundleValue);
@@ -90,19 +82,26 @@
} else {
text = visualDocument.createTextNode(value);
+ // add attribute for ability of editing
attributesMapping.add(new VpeNodeMapping(attr, text));
}
span.appendChild(text);
- } else {
+ }
+ // then text can be html code
+ else {
+ // create info
VpeChildrenInfo spanInfo = new VpeChildrenInfo(span);
+ // reparse attribute's value
NodeList list = NodeProxyUtil.reparseAttributeValue(attr);
+ // add children to info
for (int i = 0; i < list.getLength(); i++) {
Node child = list.item(i);
+ // add info to creation data
spanInfo.addSourceChild(child);
}
@@ -126,24 +125,4 @@
return true;
}
- private Attr getOutputAttributeNode(Element element) {
-
- if (element.hasAttribute(VALUE_ATTR_NAME))
- return element.getAttributeNode(VALUE_ATTR_NAME);
- else if (element.hasAttribute(BINDING_ATTR_NAME))
- return element.getAttributeNode(BINDING_ATTR_NAME);
-
- return null;
-
- }
-
- private String getBundleValue(VpePageContext pageContext, Attr attr) {
-
- BundleMap bundle = pageContext.getBundle();
-
- return bundle.getBundleValue(attr.getNodeValue(), ((IDOMAttr) attr)
- .getValueRegionStartOffset());
-
- }
-
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java 2008-02-26
16:59:09 UTC (rev 6581)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/NodeProxyUtil.java 2008-02-26
18:03:18 UTC (rev 6582)
@@ -29,12 +29,11 @@
public class NodeProxyUtil {
- static public NodeList reparseAttributeValue(Attr attr) {
-
+ static public NodeList reparseAttributeValue(String attrString, int offset) {
IStructuredDocument newStructuredDocument = StructuredDocumentFactory
.getNewStructuredDocumentInstance(new JSPSourceParser());
- newStructuredDocument.set(attr.getValue());
+ newStructuredDocument.set(attrString);
IDOMModel modelForJSP = new DOMModelForJSP();
modelForJSP.setStructuredDocument(newStructuredDocument);
@@ -43,13 +42,19 @@
NodeList list = document.getChildNodes();
- NodeList adaptersList = getNodeAdapterList(list, ((IDOMAttr) attr)
- .getValueRegionStartOffset());
+ NodeList adaptersList = getNodeAdapterList(list, offset);
return adaptersList;
}
+ static public NodeList reparseAttributeValue(Attr attr) {
+
+ return reparseAttributeValue(attr.getValue(), ((IDOMAttr) attr)
+ .getValueRegionStartOffset());
+
+ }
+
static public NodeProxy getNodeAdapter(Node node, int basicOffset) {
if (node == null)
return null;
@@ -69,7 +74,9 @@
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
- newNodeList.appendNode(getNodeAdapter(node, basicOffset));
+ // if node is only html tag
+ if (node.getPrefix() == null)
+ newNodeList.appendNode(getNodeAdapter(node, basicOffset));
}
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 2008-02-26
16:59:09 UTC (rev 6581)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-02-26
18:03:18 UTC (rev 6582)
@@ -164,173 +164,80 @@
</vpe:drop>
</vpe:dnd>
</vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:outputText" case-sensitive="yes">
- <vpe:template children="yes" modify="no"
+ </vpe:tag>
+
+ <vpe:tag name="h:outputText" case-sensitive="yes">
+ <vpe:template children="yes" modify="no"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputTextTemplate">
- </vpe:template>
- <!-- <vpe:if test="attrpresent('value')">
- <vpe:template children="no" modify="yes">
- <span class="{@styleClass}" style="{@style}"
title="{tagstring()}">
- <vpe:value expr="{jsfvalue(@value)}"/>
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="converter" />
- <vpe:container-child tag-name="convertNumber" />
- <vpe:container-child tag-name="convertDateTime" />
- <vpe:container-child tag-name="validator" />
- <vpe:container-child tag-name="validateDoubleRange" />
- <vpe:container-child tag-name="validateLongRange" />
- <vpe:container-child tag-name="validateLength" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- </vpe:if>
- <vpe:if test="attrpresent('binding')">
- <vpe:template children="no" modify="yes">
- <span class="{@styleClass}" style="{@style}"
title="{tagstring()}">
- <vpe:value expr="{jsfvalue(@binding)}"/>
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="converter" />
- <vpe:container-child tag-name="convertNumber" />
- <vpe:container-child tag-name="convertDateTime" />
- <vpe:container-child tag-name="validator" />
- <vpe:container-child tag-name="validateDoubleRange" />
- <vpe:container-child tag-name="validateLongRange" />
- <vpe:container-child tag-name="validateLength" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="BlockFormat"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="yes">
- <span class="{@styleClass}" style="{@style}"
title="{tagstring()}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="converter" />
- <vpe:container-child tag-name="convertNumber" />
- <vpe:container-child tag-name="convertDateTime" />
- <vpe:container-child tag-name="validator" />
- <vpe:container-child tag-name="validateDoubleRange" />
- <vpe:container-child tag-name="validateLongRange" />
- <vpe:container-child tag-name="validateLength" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="BlockFormat"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat"
handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler"
/>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- -->
- </vpe:tag>
-<!-- Проблема с подстановкой значений вложенных параметров (26 of 4) -->
- <vpe:tag name="h:outputFormat" case-sensitive="yes">
- <vpe:template children="no" modify="yes">
- <span title="{tagstring()}" style="{@style}"
class="{@styleClass}" >
- <vpe:value expr="{jsfvalue(@value)}"/>
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- </vpe:tag>
-
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="converter" />
+ <vpe:container-child tag-name="convertNumber" />
+ <vpe:container-child tag-name="convertDateTime" />
+ <vpe:container-child tag-name="validator" />
+ <vpe:container-child tag-name="validateDoubleRange" />
+ <vpe:container-child tag-name="validateLongRange" />
+ <vpe:container-child tag-name="validateLength" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:outputFormat" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputFormatTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:tag>
<vpe:tag name="h:graphicImage" case-sensitive="yes">
<vpe:if test="attrpresent('value')">
<vpe:template children="no" modify="yes">
@@ -559,43 +466,41 @@
</vpe:tag>
- <vpe:tag name="h:outputLabel" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <label style="{@style}" class="{@styleClass}"
title="{tagstring()}" for="{@for}">
- <vpe:value expr="{jsfvalue(@value)}"/>
- </label>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText"/>
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- </vpe:tag>
-
+ <vpe:tag name="h:outputLabel" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputLabelTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="h:selectBooleanCheckbox"
case-sensitive="yes">
<vpe:if test="@disabled='on'"> <!-- Gavr --><!--
added x: 15.02.05 -->
<vpe:template children="no" modify="no">
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-02-26
16:59:09 UTC (rev 6581)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-02-26
18:03:18 UTC (rev 6582)
@@ -74,5 +74,7 @@
public static final String ATTR_WIDTH = "WIDTH"; //$NON-NLS-1$
public static final String ATTR_HEIGHT = "HEIGHT"; //$NON-NLS-1$
public static final String ATTR_BORDER = "BORDER"; //$NON-NLS-1$
+ public static final String ATTR_FOR = "FOR";
+ public static final String ATTR_DIR = "DIR";
}
\ No newline at end of file