Author: yradtsevich
Date: 2009-02-06 11:35:31 -0500 (Fri, 06 Feb 2009)
New Revision: 13515
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.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/JsfBodyTemplate.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/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
RESOLVED - issue JBIDE-3734: style and styleClass attrs don't work in a4j:page
https://jira.jboss.org/jira/browse/JBIDE-3734
- Base class for templates of body, h:body, a4j:page has been created
- Support of style and styleClass attributes has been added
- <f:facet name='head'> now supports CSS-links
- JUnit tests have been created
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSF.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -18,5 +18,8 @@
public final class Ajax4JSF {
public static final String ATTR_ELEMENT = "element"; //$NON-NLS-1$
public static final String ATTR_URI_ATTRIBUTE = "uriAttribute"; //$NON-NLS-1$
+ public static final String ATTR_ID = "id"; //$NON-NLS-1$
+ public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
+ public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFPageTemplate.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -10,85 +10,32 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.ajax4jsf.template;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.jboss.tools.vpe.editor.template.VpeAbstractBodyTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
- * The template intended for processing {@code <a4j:page>} elements.
- *
+ * The template intended for processing {@code <a4j:page>} elements.
+ *
* @author dmaliarevich
* @author yradtsevich
*/
-public class Ajax4JSFPageTemplate extends VpeAbstractTemplate {
+public class Ajax4JSFPageTemplate extends VpeAbstractBodyTemplate {
- private static final String FACET_TEMPLATE_NAME = "f:facet"; //$NON-NLS-1$
- private static final String ATTR_NAME = "name"; //$NON-NLS-1$
- private static final String HEAD_FACET_NAME = "head"; //$NON-NLS-1$
-
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
- Element sourceElement = (Element) sourceNode;
-
- nsIDOMElement bodyContainer = visualDocument.createElement(HTML.TAG_DIV);
- VpeCreationData creationData = new VpeCreationData(bodyContainer);
-
- // Mozilla renders HEAD nested in HEAD pretty well, so we are nesting these elements
- nsIDOMElement headContainer = visualDocument.createElement(HTML.TAG_HEAD);
- pageContext.getVisualBuilder().getHeadNode().appendChild(headContainer);
-
- VpeChildrenInfo headChildrenInfo = new VpeChildrenInfo(headContainer);
- creationData.addChildrenInfo(headChildrenInfo);
-
- VpeChildrenInfo bodyChildrenInfo = new VpeChildrenInfo(bodyContainer);
- creationData.addChildrenInfo(bodyChildrenInfo);
-
- NodeList childNodes = sourceElement.getChildNodes();
- for (int i = 0; i < childNodes.getLength(); i++) {
- Node child = childNodes.item(i);
-
- if (isHeadFacet(pageContext, child)) {
- Element headFacet = (Element) child;
-
- NodeList headFacetChildren = headFacet.getChildNodes();
- for (int j = 0; j < headFacetChildren.getLength(); j++) {
- headChildrenInfo.addSourceChild(headFacetChildren.item(j));
- }
- } else {
- bodyChildrenInfo.addSourceChild(child);
- }
- }
-
- return creationData;
+ private static final Map<String, String> ATTRIBUTES_MAP = new TreeMap<String,
String>();
+ {
+ ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_DIR, HTML.ATTR_DIR);
+ ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_STYLE, HTML.ATTR_STYLE);
+ ATTRIBUTES_MAP.put(Ajax4JSF.ATTR_STYLE_CLASS, HTML.ATTR_CLASS);
}
/**
- * Returns {@code true} if and only if the {@code node} is a head facet.
+ * {@inheritDoc}
*/
- private static boolean isHeadFacet(VpePageContext pageContext, Node node) {
- String templateName = VpeTemplateManager.getInstance().getTemplateName(pageContext,
node);
- if (FACET_TEMPLATE_NAME.equals(templateName)) {
- Element element = (Element) node;
- String name = element.getAttribute(ATTR_NAME);
- if (HEAD_FACET_NAME.equals(name)) {
- return true;
- }
- }
- return false;
- }
-
@Override
- public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
+ protected String getTargetAttributeName(String sourceAttributeName) {
+ return ATTRIBUTES_MAP.get(sourceAttributeName);
}
}
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-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-02-06
16:35:31 UTC (rev 13515)
@@ -1,301 +1,297 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates
xmlns:vpe="http://org.jboss.org/tools/vpe/template"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <vpe:template-taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j" />
- <vpe:template-taglib
uri="http://richfaces.org/a4j" prefix="a4j"
/>
-
- <vpe:tag name="a4j:page" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFPageTemplate">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:region" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}" class="{@styleClass}"
style="{@style}" title="{tagstring()}">
- </div>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:ajaxListener" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:keepAlive" case-sensitive="yes">
- <vpe:template children="no" modify="no">
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:support" case-sensitive="yes">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="a4j:poll" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:commandLink" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
- style="{@style}" dir="{@dir}"
title="{tagstring()}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText"/>
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormatting>
- <vpe:pseudoContent/>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:commandButton" case-sensitive="yes">
- <!-- This is a very big if-statement.
- Its goal is to add support of 'disabled property'
- DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
- <vpe:if test="(@disabled='true')">
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled="disabled"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled="disabled"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <vpe:if test="attrpresent('image')">
- <vpe:template children="no" modify="no">
- <input type="image" src="{src(@image)}"
- class="{@styleClass}" style="{@style}"
title="{tagstring()}"
- disabled="disabled"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <!--else-->
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <vpe:if test="attrpresent('image')">
- <vpe:template children="no" modify="no">
- <input type="image" src="{src(@image)}"
class="{@styleClass}" style="{@style}"
title="{tagstring()}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <!--end-of-else-->
- </vpe:tag>
-
- <vpe:tag name="a4j:outputPanel" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}" style="{@style}" dir="{@dir}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:actionparam" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:status" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
-
class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFStatusTemplate">
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:loadBundle" case-sensitive="yes">
- <vpe:template children="no" modify="no">
- <vpe:load-bundle/>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:loadStyle" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- <vpe:link rel="stylesheet" href="{href(@src)}" />
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:loadScript" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:jsFunction" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:mediaOutput" case-sensitive="yes">
- <vpe:template children="no" modify="no"
-
class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFMediaOutput">
-
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:log" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:form" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}" class="{@styleClass}"
style="{@style}" title="{tagstring()}">
- </div>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:htmlCommandLink" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
- style="{@style}" title="{tagstring()}"
dir="{@dir}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText"/>
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="BlockFormat"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormatting>
- <vpe:pseudoContent/>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:include" case-sensitive="yes">
- <vpe:template children="yes" file="{@viewId}"
class="org.jboss.tools.vpe.editor.template.VpeIncludeTemplate"/>
- </vpe:tag>
-
- <vpe:tag name="a4j:repeat" case-sensitive="yes"
haveVisualPreview="no">
- <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFReapeatTemplate">
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:portlet" case-sensitive="yes">
- <vpe:template children="yes" modify="no">
- <span>
- </span>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="a4j:push" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- </vpe:template>
- </vpe:tag>
-
- <!-- Since RichFaces 3.3.0 -->
- <vpe:tag name="a4j:queue" case-sensitive="yes">
- <vpe:if test="tld_version('min=3.3')">
- <vpe:template children="no" modify="no">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no"/>
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-</vpe:templates>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<vpe:templates
xmlns:vpe="http://org.jboss.org/tools/vpe/template"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <vpe:template-taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j" />
+ <vpe:template-taglib
uri="http://richfaces.org/a4j" prefix="a4j"
/>
+
+ <vpe:tag name="a4j:page" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFPageTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:region" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <div id="{@id}" class="{@styleClass}"
style="{@style}" title="{tagstring()}">
+ </div>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:ajaxListener" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:keepAlive" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:support" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="a4j:poll" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:commandLink" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
+ style="{@style}" dir="{@dir}"
title="{tagstring()}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText"/>
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ </vpe:textFormatting>
+ <vpe:pseudoContent/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:commandButton" case-sensitive="yes">
+ <!-- This is a very big if-statement.
+ Its goal is to add support of 'disabled property'
+ DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
+ <vpe:if test="(@disabled='true')">
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled="disabled"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled="disabled"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <vpe:if test="attrpresent('image')">
+ <vpe:template children="no" modify="no">
+ <input type="image" src="{src(@image)}"
+ class="{@styleClass}" style="{@style}"
title="{tagstring()}"
+ disabled="disabled"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <!--else-->
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <vpe:if test="attrpresent('image')">
+ <vpe:template children="no" modify="no">
+ <input type="image" src="{src(@image)}"
class="{@styleClass}" style="{@style}"
title="{tagstring()}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <!--end-of-else-->
+ </vpe:tag>
+
+ <vpe:tag name="a4j:outputPanel" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <div id="{@id}" style="{@style}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:actionparam" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:status" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+
class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFStatusTemplate">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:loadBundle" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ <vpe:load-bundle/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:loadStyle" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ <vpe:link rel="stylesheet" href="{href(@src)}" />
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:loadScript" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:jsFunction" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:mediaOutput" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
+
class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFMediaOutput">
+
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:log" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:form" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <div id="{@id}" class="{@styleClass}"
style="{@style}" title="{tagstring()}">
+ </div>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:htmlCommandLink" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
+ style="{@style}" title="{tagstring()}"
dir="{@dir}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes"/>
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText"/>
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="BlockFormat"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style"/>
+ </vpe:format>
+ </vpe:textFormatting>
+ <vpe:pseudoContent/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:include" case-sensitive="yes">
+ <vpe:template children="yes" file="{@viewId}"
class="org.jboss.tools.vpe.editor.template.VpeIncludeTemplate"/>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:repeat" case-sensitive="yes"
haveVisualPreview="no">
+ <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFReapeatTemplate">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:portlet" case-sensitive="yes">
+ <vpe:template children="yes" modify="no">
+ <span>
+ </span>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="a4j:push" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ </vpe:template>
+ </vpe:tag>
+
+ <!-- Since RichFaces 3.3.0 -->
+ <vpe:tag name="a4j:queue" case-sensitive="yes">
+ <vpe:if test="tld_version('min=3.3')">
+ <vpe:template children="no" modify="no">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"/>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+</vpe:templates>
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -10,42 +10,30 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.vpe.editor.template.VpeAbstractBodyTemplate;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.html.template.HtmlBodyTemplate;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
/**
- * A wrapper of VpeAbstractTemplate. Does the same, but ignores all attributes except
id.
+ * The template of h:body.
+ *
+ * Omits all attributes except 'id'
+ *
+ * @see VpeAbstractBodyTemplate
* @author yradtsevich
- * @see HtmlBodyTemplate
*/
-public class JsfBodyTemplate extends VpeAbstractTemplate {
- public static final String ID_ID = "id"; //$NON-NLS-1$
-
- private final HtmlBodyTemplate htmlBodyTemplate = new HtmlBodyTemplate();
-
+public class JsfBodyTemplate extends VpeAbstractBodyTemplate {
+
/**
- * @see
org.jboss.tools.vpe.html.template.HtmlBodyTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ * {@inheritDoc}
*/
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
- sourceNode = sourceNode.cloneNode(true);
- NamedNodeMap attributes = sourceNode.getAttributes();
- int length = attributes.getLength();
- for (int i = 0; i < length; i++) {
- Node attribute = attributes.item(i);
-
- if(!attribute.getNodeName().equalsIgnoreCase(ID_ID)) {
- attributes.removeNamedItem(attribute.getNodeName());
- }
+ @Override
+ protected String getTargetAttributeName(String sourceAttributeName) {
+ if (sourceAttributeName.equals(JSF.ATTR_ID)) {
+ return HTML.ATTR_ID;
+ } else {
+ return null;
}
-
- return htmlBodyTemplate.create(pageContext, sourceNode, visualDocument);
}
}
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-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/util/JSF.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -33,6 +33,8 @@
public static final String ATTR_FOR = "for"; //$NON-NLS-1$
+ public static final String ATTR_ID = "id";//$NON-NLS-1$
+
public static final String ATTR_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
public static final String ATTR_ITEM_VALUE = "itemValue"; //$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-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-02-06
16:35:31 UTC (rev 13515)
@@ -1,897 +1,906 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<vpe:templates
xmlns:vpe="http://org.jboss.org/tools/vpe/template"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <vpe:template-taglib
uri="http://java.sun.com/jsf/html"
prefix="h" />
- <vpe:template-taglib
uri="http://java.sun.com/jsf/core"
prefix="f" />
-
- <vpe:tag name="f:loadBundle" case-sensitive="yes">
- <vpe:template children="no" modify="no">
- <vpe:load-bundle />
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="f:verbatim" case-sensitive="yes">
- <vpe:if test="(@escape='true')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfVerbatim">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="yes">
- <span title="{tagstring()}" />
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:inputText" case-sensitive="yes">
- <vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextTemplate">
- <!-- <input type="text" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
title="{tagstring()}"
- size="{@size}" dir="{@dir}" /> -->
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:inputTextarea" case-sensitive="yes">
- <vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextAreaTemplate">
- <!-- <textarea class="{@styleClass}" style="{@style}"
- rows="{@rows}" cols="{@cols}" title="{tagstring()}"
dir="{@dir}">
- <vpe:value expr="{jsfvalue(@value)}" />
- </textarea>-->
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:inputSecret" case-sensitive="yes">
- <vpe:template children="no" modify="no">
- <input type="password" value="{jsfvalue(@value)}"
- class="{@styleClass}" style="{@style}"
title="{tagstring()}"
- size="{@size}" dir="{@dir}" />
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:inputHidden" case-sensitive="yes">
- <vpe:template children="no" modify="no" >
- <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:template>
- </vpe:tag>
-
- <vpe:tag name="h:outputText" case-sensitive="yes">
- <vpe:if test="hasinparents('rich:progressBar')">
- <vpe:template children="yes" modify="no">
- <span style="display:none;"/>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="no"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputTextTemplate">
- <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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
- <vpe:tag name="h:graphicImage" case-sensitive="yes">
- <vpe:if test="attrpresent('value')">
- <vpe:template children="no" modify="yes">
- <img src="{src(jsfvalue(@value))}" width="{@width}"
- height="{@height}" class="{@styleClass}"
style="{@style}"
- title="{tagstring()}" alt="{jsfvalue(@alt)}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- </vpe:template>
- </vpe:if>
- <vpe:template children="no" modify="yes">
- <img src="{src(jsfvalue(@url))}" width="{@width}"
- height="{@height}" class="{@styleClass}"
style="{@style}"
- title="{tagstring()}" alt="{jsfvalue(@alt)}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- </vpe:template>
- </vpe:tag>
-
- <!-- Проблема с адресацией от приложения (30 of 4) -->
- <vpe:tag name="h:commandButton" case-sensitive="yes">
- <!-- This is a very big if-statement.
- Its goal is to add support of 'disabled property'
- DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
- <vpe:if test="(@disabled='true')">
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{iif(@value='','
',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled='disabled'/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{iif(@value='','
',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"
- disabled='disabled'/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <vpe:if test="attrpresent('image')">
- <vpe:template children="no" modify="no">
- <input type="image" src="{src(@image)}"
- class="{@styleClass}" style="{@style}"
title="{tagstring()}"
- disabled='disabled'/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <!--else-->
- <vpe:if test="not(attrpresent('image'))">
- <vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">
- <input type="button" value="{iif(@value='','
',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="not(@type='')">
- <vpe:template children="no" modify="no">
- <input type="{@type}" value="{iif(@value='','
',jsfvalue(@value))}"
- class="{@styleClass}" style="{@style}"
- title="{tagstring()}" dir="{@dir}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- </vpe:if>
- <vpe:if test="attrpresent('image')">
- <vpe:template children="no" modify="no">
- <input type="image" src="{src(@image)}"
- class="{@styleClass}" style="{@style}"
title="{tagstring()}" />
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <!--end-of-else-->
- </vpe:tag>
-
- <!-- Проблема с вложенным параметром (31 of 4) -->
- <vpe:tag name="h:commandLink" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfCommandLinkTemplate">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting>
- <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:textFormatting>
- <vpe:pseudoContent />
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:outputLink" case-sensitive="yes">
- <vpe:if test="(@disabled='true')">
- <vpe:template children="yes" modify="yes">
- <span class="{@styleClass}" style="{@style}"
- dir="{@dir}">
- </span>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat"
- setDefault="true">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:if test="tld_version('min=1.2')">
- <vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}"
- style="{@style}"
- dir="{@dir}"
- title="{tagstring()}"/>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormatting>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputLinkTemplate">
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormatting>
- </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:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </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">
- <input type="checkbox" disabled="on"
checked="{@value}"
- class="{@styleClass}" style="{@style}"
border="{@border}"
- title="{tagstring()}" />
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- <vpe:template children="no" modify="no">
- <input type="checkbox" checked="{@value}"
- class="{@styleClass}" style="{@style}"
border="{@border}"
- title="{tagstring()}" />
- </vpe:template>
- </vpe:tag>
-
- <!--
- Проблема с вложенными f:selectItem (42 of 4) и f:selectItems (50 of 4)
- Возможна проблема с нечувствительностью к регистру lineDirection/pageDirection (44 of
4)
- -->
- <vpe:tag name="h:selectManyCheckbox" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectManyCheckbox">
-
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectOneRadio" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneRadioTemplate">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectOneListbox" case-sensitive="yes">
- <vpe:template
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneListbox"
- children="yes" modify="yes">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectManyListbox" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectManyListbox">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
- <vpe:template
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneMenuTemplate"
- children="yes" modify="yes">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectManyMenu" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <select style="{@style}" multiple="multiple"
- class="{@styleClass}" title="{tagstring()}" size="1"
dir="{@dir}" />
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="f:selectItem" case-sensitive="yes">
- <vpe:if test="hasinparents('h:selectManyCheckbox')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('x:selectManyCheckbox')|hasinparents('t:selectManyCheckbox')">
- <vpe:template children="no" modify="yes">
- <span title="{tagstring()}">
- <input type="checkbox" />
- <vpe:value expr="{jsfvalue(@itemLabel)}" />
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:breaker type="selectItem" />
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('t:selectManyMenu')|
- hasinparents('x:selectOneRadio')|
- hasinparents('x:selectOneMenu')">
- <!-- Gavr --><!-- added x: 8.02.05 -->
- <vpe:template children="no" modify="yes">
- <option value="{@itemValue}" title="{tagstring()}">
- <vpe:value expr="{jsfvalue(@itemLabel)}" />
- </option>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-
- <vpe:tag name="f:selectItems" case-sensitive="yes">
- <vpe:if test="hasinparents('h:selectManyCheckbox')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemsTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemsTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemsTemplate">
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('x:selectManyCheckbox')|hasinparents('t:selectManyCheckbox')">
- <vpe:template children="no" modify="yes">
- <span title="{tagstring()}">
- <input type="checkbox" />
- <vpe:value expr="{jsfvalue(@itemLabel)}" />
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- <vpe:breaker type="selectItem" />
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="hasinparents('t:selectManyMenu')|
- hasinparents('x:selectOneRadio')|
- hasinparents('x:selectOneMenu')">
- <!-- Gavr --><!-- added x: 8.02.05 -->
- <vpe:template children="no" modify="yes">
- <option value="{@itemValue}" title="{tagstring()}">
- <vpe:value expr="{jsfvalue(@itemLabel)}" />
- </option>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-
- <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
- <vpe:template children="yes" modify="no">
- <select></select>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:panelGroup" case-sensitive="yes">
-
- <vpe:if test="@layout='block'">
- <vpe:template children="yes" modify="yes">
- <div 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" />
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:panelGrid" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <vpe:panelgrid border="{iif(@border='','0',@border)}"
- style="{@style}" class="{@styleClass}" width="{@width}"
- dir="{@dir}" frame="{@frame}"
rules="{jsfvalue(@rules)}" columnClasses="{@columnClasses}"
- footerClass="{@footerClass}" headerClass="{@headerClass}"
- captionClass="{@captionClass}" captionStyle="{@captionStyle}"
rowClasses="{@rowClasses}" cellspacing="{@cellspacing}"
- cellpadding="{@cellpadding}" bgcolor="{@bgcolor}"
- title="{tagstring()}" table-size="{@columns}" />
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:breaker type="ignore" />
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:dataTable" case-sensitive="yes">
- <vpe:template children="yes" modify="no">
- <vpe:datatable width="{@width}" height="{@height}"
bgcolor="{@bgcolor}"
- border="{@border}" cellpadding="{@cellpadding}"
- cellspacing="{@cellspacing}" columnClasses="{@columnClasses}"
- footerClass="{@footerClass}" headerClass="{@headerClass}"
- rowClasses="{@rowClasses}" frame="{@frame}"
rules="{@rules}"
- class="{@styleClass}" style="{@style}"
title="{tagstring()}" dir="{@dir}"/>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="column" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- <vpe:format type="BlockFormat" addChildren="deny" />
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:column" case-sensitive="yes">
- <vpe:if
- test="parentname()='h:dataTable'|parentname()='h:panelGrid'">
-<!-- Gavr --><!-- added x: 8.02.05 -->
- <vpe:template children="yes" modify="yes">
- <vpe:column title="{tagstring()}" />
- </vpe:template>
- </vpe:if>
- <vpe:if
- test="parentname()='rich:columnGroup'|parentname()='rich:dataTable'|parentname()='rich:orderingList'|parentname()='rich:listShuttle'|parentname()='rich:scrollableDataTable'">
- <vpe:template children="yes" modify="yes"
- namespaceIdentifier="org.jboss.tools.jsf.vpe.richfaces"
- class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesColumnTemplate">
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-
- <vpe:tag name="f:facet" case-sensitive="yes">
- <vpe:if test="@name='popup'">
- <vpe:template children="yes" modify="yes"
></vpe:template>
- </vpe:if>
-
- <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfFacet" >
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:pseudoContent defaultText="yes" attrName="name" />
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="f:view" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfView">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:pseudoContent defaultText="yes" />
- <vpe:textFormatting>
- <vpe:format type="BlockFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
- <vpe:format type="BoldFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler"
/>
- <vpe:format type="ItalicFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.ItalicFormatHandler"
/>
- <vpe:format type="UnderlineFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.UnderlineFormatHandler"
/>
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="f:subview" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfSubView">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:pseudoContent defaultText="yes" />
- <vpe:textFormatting>
- <vpe:format type="BlockFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
- <vpe:format type="BoldFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler"
/>
- <vpe:format type="ItalicFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.ItalicFormatHandler"
/>
- <vpe:format type="UnderlineFormat" addParent="deny"
- addChildren="allow"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.UnderlineFormatHandler"
/>
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:form" case-sensitive="yes">
- <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfForm">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="f:attribute" case-sensitive="yes">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:param">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:phaseListener">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:setPropertyActionListener">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:actionListener">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:valueChangeListener">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:convertDateTime">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:converter">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:convertNumber">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:validator">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:validateDoubleRange">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:validateLength">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="f:validateLongRange">
- <vpe:template children="no" modify="no" />
- </vpe:tag>
-
- <vpe:tag name="h:message">
- <vpe:template children="no" modify="no">
- <span class="{@styleClass}" style="{@style}">
- Error Message
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:messages">
- <vpe:template children="no" modify="no">
- <span class="{@styleClass}" style="{@style}">
- Error Messages
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- <vpe:textFormatting use-default-formats="yes">
- </vpe:textFormatting>
- </vpe:template>
- </vpe:tag>
-
- <!-- JSF 2.0 Tags -->
- <vpe:tag name="h:body" case-sensitive="yes">
- <!-- The tag cannot have any attribute. -->
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="yes" modify="yes"
- class="org.jboss.tools.jsf.vpe.jsf.template.JsfBodyTemplate">
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no"></vpe:drop>
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-
- <vpe:tag name="h:head" case-sensitive="yes">
- <!-- The tag cannot have any attribute. -->
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="yes" modify="no">
- <div style="display:none;" />
- <vpe:dnd>
- <vpe:drop container="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- </vpe:tag>
-
- <!--
- Tag h:outputScript can have any of next attributes: name, library, target.
- Mojarra 2.0 EDR1 implementation of JSF 2.0 includes a script as follows:
- <script type="text/javascript"
- src="{facesContext.getApplication().getResourceHandler().createResource(name,
library).getRequestPath()}"/>
- -->
- <vpe:tag name="h:outputScript" case-sensitive="yes">
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="no" modify="no"/>
- </vpe:if>
- </vpe:tag>
-
- <!--
- Tag h:outputStylesheet can have any of next attributes: name, library, target.
- Value of target could be either 'head' or 'body'.
- Mojarra 2.0 EDR1 implementation of JSF 2.0 links a stylesheet as follows:
- <link type="text/css" rel="stylesheet"
- href="{facesContext.getApplication().getResourceHandler().createResource(name,
library).getRequestPath()}"/>
- -->
- <vpe:tag name="h:outputStylesheet" case-sensitive="yes">
- <vpe:if test="tld_version('min=2.0')">
- <vpe:template children="no" modify="no">
- <vpe:link rel="stylesheet" href="{href(@name)}" />
- </vpe:template>
- </vpe:if>
- </vpe:tag>
- <!-- End of JSF 2.0 Tags -->
-
- <!-- Default template -->
- <vpe:template children="yes" modify="no">
- <vpe:any value="{name()}" title="{tagstring()}"/>
- </vpe:template>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<vpe:templates
xmlns:vpe="http://org.jboss.org/tools/vpe/template"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <vpe:template-taglib
uri="http://java.sun.com/jsf/html"
prefix="h" />
+ <vpe:template-taglib
uri="http://java.sun.com/jsf/core"
prefix="f" />
+
+ <vpe:tag name="f:loadBundle" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ <vpe:load-bundle />
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="f:verbatim" case-sensitive="yes">
+ <vpe:if test="(@escape='true')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfVerbatim">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="yes" modify="yes">
+ <span title="{tagstring()}" />
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:inputText" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextTemplate">
+ <!-- <input type="text" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
title="{tagstring()}"
+ size="{@size}" dir="{@dir}" /> -->
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:inputTextarea" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextAreaTemplate">
+ <!-- <textarea class="{@styleClass}" style="{@style}"
+ rows="{@rows}" cols="{@cols}" title="{tagstring()}"
dir="{@dir}">
+ <vpe:value expr="{jsfvalue(@value)}" />
+ </textarea>-->
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:inputSecret" case-sensitive="yes">
+ <vpe:template children="no" modify="no">
+ <input type="password" value="{jsfvalue(@value)}"
+ class="{@styleClass}" style="{@style}"
title="{tagstring()}"
+ size="{@size}" dir="{@dir}" />
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:inputHidden" case-sensitive="yes">
+ <vpe:template children="no" modify="no" >
+ <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:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:outputText" case-sensitive="yes">
+ <vpe:if test="hasinparents('rich:progressBar')">
+ <vpe:template children="yes" modify="no">
+ <span style="display:none;"/>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputTextTemplate">
+ <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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+ <vpe:tag name="h:graphicImage" case-sensitive="yes">
+ <vpe:if test="attrpresent('value')">
+ <vpe:template children="no" modify="yes">
+ <img src="{src(jsfvalue(@value))}" width="{@width}"
+ height="{@height}" class="{@styleClass}"
style="{@style}"
+ title="{tagstring()}" alt="{jsfvalue(@alt)}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="no" modify="yes">
+ <img src="{src(jsfvalue(@url))}" width="{@width}"
+ height="{@height}" class="{@styleClass}"
style="{@style}"
+ title="{tagstring()}" alt="{jsfvalue(@alt)}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ </vpe:template>
+ </vpe:tag>
+
+ <!-- Проблема с адресацией от приложения (30 of 4) -->
+ <vpe:tag name="h:commandButton" case-sensitive="yes">
+ <!-- This is a very big if-statement.
+ Its goal is to add support of 'disabled property'
+ DO NOT FORGET TO EDIT 'ELSE' PART IN FUTURE MODIFICATIONS -->
+ <vpe:if test="(@disabled='true')">
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{iif(@value='','
',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled='disabled'/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{iif(@value='','
',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"
+ disabled='disabled'/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <vpe:if test="attrpresent('image')">
+ <vpe:template children="no" modify="no">
+ <input type="image" src="{src(@image)}"
+ class="{@styleClass}" style="{@style}"
title="{tagstring()}"
+ disabled='disabled'/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <!--else-->
+ <vpe:if test="not(attrpresent('image'))">
+ <vpe:if test="(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="button" value="{iif(@value='','
',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="not(@type='')">
+ <vpe:template children="no" modify="no">
+ <input type="{@type}" value="{iif(@value='','
',jsfvalue(@value))}"
+ class="{@styleClass}" style="{@style}"
+ title="{tagstring()}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ </vpe:if>
+ <vpe:if test="attrpresent('image')">
+ <vpe:template children="no" modify="no">
+ <input type="image" src="{src(@image)}"
+ class="{@styleClass}" style="{@style}"
title="{tagstring()}" />
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <!--end-of-else-->
+ </vpe:tag>
+
+ <!-- Проблема с вложенным параметром (31 of 4) -->
+ <vpe:tag name="h:commandLink" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfCommandLinkTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="outputText" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting>
+ <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:textFormatting>
+ <vpe:pseudoContent />
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:outputLink" case-sensitive="yes">
+ <vpe:if test="(@disabled='true')">
+ <vpe:template children="yes" modify="yes">
+ <span class="{@styleClass}" style="{@style}"
+ dir="{@dir}">
+ </span>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat"
+ setDefault="true">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:if test="tld_version('min=1.2')">
+ <vpe:template children="yes" modify="yes">
+ <vpe:a class="{@styleClass}"
+ style="{@style}"
+ dir="{@dir}"
+ title="{tagstring()}"/>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfOutputLinkTemplate">
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="UnderlineFormat" setDefault="true">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormatting>
+ </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:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </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">
+ <input type="checkbox" disabled="on"
checked="{@value}"
+ class="{@styleClass}" style="{@style}"
border="{@border}"
+ title="{tagstring()}" />
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="no" modify="no">
+ <input type="checkbox" checked="{@value}"
+ class="{@styleClass}" style="{@style}"
border="{@border}"
+ title="{tagstring()}" />
+ </vpe:template>
+ </vpe:tag>
+
+ <!--
+ Проблема с вложенными f:selectItem (42 of 4) и f:selectItems (50 of 4)
+ Возможна проблема с нечувствительностью к регистру lineDirection/pageDirection (44 of
4)
+ -->
+ <vpe:tag name="h:selectManyCheckbox" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectManyCheckbox">
+
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectOneRadio" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneRadioTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectOneListbox" case-sensitive="yes">
+ <vpe:template
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneListbox"
+ children="yes" modify="yes">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectManyListbox" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectManyListbox">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
+ <vpe:template
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSelectOneMenuTemplate"
+ children="yes" modify="yes">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectManyMenu" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <select style="{@style}" multiple="multiple"
+ class="{@styleClass}" title="{tagstring()}" size="1"
dir="{@dir}" />
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="f:selectItem" case-sensitive="yes">
+ <vpe:if test="hasinparents('h:selectManyCheckbox')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('x:selectManyCheckbox')|hasinparents('t:selectManyCheckbox')">
+ <vpe:template children="no" modify="yes">
+ <span title="{tagstring()}">
+ <input type="checkbox" />
+ <vpe:value expr="{jsfvalue(@itemLabel)}" />
+ </span>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:breaker type="selectItem" />
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('t:selectManyMenu')|
+ hasinparents('x:selectOneRadio')|
+ hasinparents('x:selectOneMenu')">
+ <!-- Gavr --><!-- added x: 8.02.05 -->
+ <vpe:template children="no" modify="yes">
+ <option value="{@itemValue}" title="{tagstring()}">
+ <vpe:value expr="{jsfvalue(@itemLabel)}" />
+ </option>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <vpe:tag name="f:selectItems" case-sensitive="yes">
+ <vpe:if test="hasinparents('h:selectManyCheckbox')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfCheckboxSelectItemsTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectManyListbox')|hasinparents('h:selectManyMenu')|hasinparents('h:selectOneListbox')|hasinparents('h:selectOneMenu')|hasinparents('rich:pickList')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfOptionSelectItemsTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.selectitem.JsfRadioSelectItemsTemplate">
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('x:selectManyCheckbox')|hasinparents('t:selectManyCheckbox')">
+ <vpe:template children="no" modify="yes">
+ <span title="{tagstring()}">
+ <input type="checkbox" />
+ <vpe:value expr="{jsfvalue(@itemLabel)}" />
+ </span>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ <vpe:breaker type="selectItem" />
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="hasinparents('t:selectManyMenu')|
+ hasinparents('x:selectOneRadio')|
+ hasinparents('x:selectOneMenu')">
+ <!-- Gavr --><!-- added x: 8.02.05 -->
+ <vpe:template children="no" modify="yes">
+ <option value="{@itemValue}" title="{tagstring()}">
+ <vpe:value expr="{jsfvalue(@itemLabel)}" />
+ </option>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectOneMenu" case-sensitive="yes">
+ <vpe:template children="yes" modify="no">
+ <select></select>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:panelGroup" case-sensitive="yes">
+
+ <vpe:if test="@layout='block'">
+ <vpe:template children="yes" modify="yes">
+ <div 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" />
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:panelGrid" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <vpe:panelgrid border="{iif(@border='','0',@border)}"
+ style="{@style}" class="{@styleClass}" width="{@width}"
+ dir="{@dir}" frame="{@frame}"
rules="{jsfvalue(@rules)}" columnClasses="{@columnClasses}"
+ footerClass="{@footerClass}" headerClass="{@headerClass}"
+ captionClass="{@captionClass}" captionStyle="{@captionStyle}"
rowClasses="{@rowClasses}" cellspacing="{@cellspacing}"
+ cellpadding="{@cellpadding}" bgcolor="{@bgcolor}"
+ title="{tagstring()}" table-size="{@columns}" />
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:breaker type="ignore" />
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:dataTable" case-sensitive="yes">
+ <vpe:template children="yes" modify="no">
+ <vpe:datatable width="{@width}" height="{@height}"
bgcolor="{@bgcolor}"
+ border="{@border}" cellpadding="{@cellpadding}"
+ cellspacing="{@cellspacing}" columnClasses="{@columnClasses}"
+ footerClass="{@footerClass}" headerClass="{@headerClass}"
+ rowClasses="{@rowClasses}" frame="{@frame}"
rules="{@rules}"
+ class="{@styleClass}" style="{@style}"
title="{tagstring()}" dir="{@dir}"/>
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="column" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ <vpe:format type="BlockFormat" addChildren="deny" />
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:column" case-sensitive="yes">
+ <vpe:if
+ test="parentname()='h:dataTable'|parentname()='h:panelGrid'">
+<!-- Gavr --><!-- added x: 8.02.05 -->
+ <vpe:template children="yes" modify="yes">
+ <vpe:column title="{tagstring()}" />
+ </vpe:template>
+ </vpe:if>
+ <vpe:if
+ test="parentname()='rich:columnGroup'|parentname()='rich:dataTable'|parentname()='rich:orderingList'|parentname()='rich:listShuttle'|parentname()='rich:scrollableDataTable'">
+ <vpe:template children="yes" modify="yes"
+ namespaceIdentifier="org.jboss.tools.jsf.vpe.richfaces"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesColumnTemplate">
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <vpe:tag name="f:facet" case-sensitive="yes">
+ <vpe:if test="@name='popup'">
+ <vpe:template children="yes" modify="yes"
></vpe:template>
+ </vpe:if>
+
+ <vpe:if test="@name='head' and
parentname()='a4j:page'">
+ <vpe:template children="yes" modify="no">
+ <div style="display:none;"/>
+ <vpe:dnd>
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+
+ <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.jsf.template.JsfFacet" >
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:pseudoContent defaultText="yes" attrName="name" />
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="f:view" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfView">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:pseudoContent defaultText="yes" />
+ <vpe:textFormatting>
+ <vpe:format type="BlockFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
+ <vpe:format type="BoldFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler"
/>
+ <vpe:format type="ItalicFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.ItalicFormatHandler"
/>
+ <vpe:format type="UnderlineFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.UnderlineFormatHandler"
/>
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="f:subview" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfSubView">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:pseudoContent defaultText="yes" />
+ <vpe:textFormatting>
+ <vpe:format type="BlockFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler"
/>
+ <vpe:format type="BoldFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BoldFormatHandler"
/>
+ <vpe:format type="ItalicFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.ItalicFormatHandler"
/>
+ <vpe:format type="UnderlineFormat" addParent="deny"
+ addChildren="allow"
+ handler="org.jboss.tools.vpe.editor.toolbar.format.handler.UnderlineFormatHandler"
/>
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:form" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
hasImaginaryBorder="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfForm">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="f:attribute" case-sensitive="yes">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:param">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:phaseListener">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:setPropertyActionListener">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:actionListener">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:valueChangeListener">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:convertDateTime">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:converter">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:convertNumber">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:validator">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:validateDoubleRange">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:validateLength">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="f:validateLongRange">
+ <vpe:template children="no" modify="no" />
+ </vpe:tag>
+
+ <vpe:tag name="h:message">
+ <vpe:template children="no" modify="no">
+ <span class="{@styleClass}" style="{@style}">
+ Error Message
+ </span>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:messages">
+ <vpe:template children="no" modify="no">
+ <span class="{@styleClass}" style="{@style}">
+ Error Messages
+ </span>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no" />
+ </vpe:dnd>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <!-- JSF 2.0 Tags -->
+ <vpe:tag name="h:body" case-sensitive="yes">
+ <!-- The tag cannot have any attribute. -->
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfBodyTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"></vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <vpe:tag name="h:head" case-sensitive="yes">
+ <!-- The tag cannot have any attribute. -->
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="yes" modify="no">
+ <div style="display:none;" />
+ <vpe:dnd>
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <!--
+ Tag h:outputScript can have any of next attributes: name, library, target.
+ Mojarra 2.0 EDR1 implementation of JSF 2.0 includes a script as follows:
+ <script type="text/javascript"
+ src="{facesContext.getApplication().getResourceHandler().createResource(name,
library).getRequestPath()}"/>
+ -->
+ <vpe:tag name="h:outputScript" case-sensitive="yes">
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="no" modify="no"/>
+ </vpe:if>
+ </vpe:tag>
+
+ <!--
+ Tag h:outputStylesheet can have any of next attributes: name, library, target.
+ Value of target could be either 'head' or 'body'.
+ Mojarra 2.0 EDR1 implementation of JSF 2.0 links a stylesheet as follows:
+ <link type="text/css" rel="stylesheet"
+ href="{facesContext.getApplication().getResourceHandler().createResource(name,
library).getRequestPath()}"/>
+ -->
+ <vpe:tag name="h:outputStylesheet" case-sensitive="yes">
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="no" modify="no">
+ <vpe:link rel="stylesheet" href="{href(@name)}" />
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+ <!-- End of JSF 2.0 Tags -->
+
+ <!-- Default template -->
+ <vpe:template children="yes" modify="no">
+ <vpe:any value="{name()}" title="{tagstring()}"/>
+ </vpe:template>
</vpe:templates>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.css 2009-02-06
16:35:31 UTC (rev 13515)
@@ -0,0 +1,6 @@
+.red {
+ color:red;
+}
+.bold {
+ font-weight: bold;
+}
Copied:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml
(from rev 13476,
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml)
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Name: svn:mergeinfo
+
Copied:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml
(from rev 13476,
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml)
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml 2009-02-06
16:35:31 UTC (rev 13515)
@@ -0,0 +1,16 @@
+<tests>
+ <test id="page">
+ <DIV>
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ <H1 STYLE="-moz-user-modify: read-write;">
+ Hello World Demonstration Document
+ </H1>
+ </DIV>
+ <SPAN CLASS="red" STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ Red Bold Text on Black Background
+ </SPAN>
+ </SPAN>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page/page.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Deleted:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml
===================================================================
(Binary files differ)
Deleted:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml 2009-02-06
16:35:31 UTC (rev 13515)
@@ -1,11 +0,0 @@
-<tests>
- <test id="page">
- <DIV>
- <SPAN CLASS="red">
- <SPAN CLASS="vpe-text">
- Red Text
- </SPAN>
- </SPAN>
- </DIV>
- </test>
-</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -81,7 +81,7 @@
}
public void testPage() throws Throwable {
- performContentTest("components/page.xhtml");//$NON-NLS-1$
+ performContentTest("components/page/page.xhtml");//$NON-NLS-1$
}
public void testPoll() throws Throwable {
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/JBIDE3734.xhtml 2009-02-06
16:35:31 UTC (rev 13515)
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<f:view
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+ <a4j:page id="page" style="background-color:black;"
styleClass="bold" dir="LTR">
+ <f:facet name="head">
+ <title>
+ Hello World Demonstration Document
+ </title>
+ <style>
+ .red {
+ color:blue;
+ }
+ </style>
+ <link rel="stylesheet" href="page.css"
type="text/css"></link>
+ </f:facet>
+ <span class="red">Red Bold Text on Black Background</span>
+ </a4j:page>
+</f:view>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3734/page.css 2009-02-06
16:35:31 UTC (rev 13515)
@@ -0,0 +1,6 @@
+.red {
+ color:red;
+}
+.bold {
+ font-weight: bold;
+}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -51,6 +51,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3482Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3617Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3632Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3734Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE924Test;
@@ -81,6 +82,7 @@
// $JUnit-BEGIN$
suite.addTestSuite(JsfComponentTest.class);
suite.addTestSuite(Jsf20ComponentContentTest.class);
+ suite.addTestSuite(JBIDE3734Test.class);
suite.addTestSuite(JBIDE3617Test.class);
suite.addTestSuite(JBIDE3473Test.class);
suite.addTestSuite(JBIDE3441Test.class);
@@ -128,6 +130,7 @@
suite.addTestSuite(JBIDE3482Test.class);
suite.addTestSuite(JBIDE3632Test.class);
+
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3734Test.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNodeList;
+
+/**
+ * The class for testing JBIDE-3734
+ *
+ * @author yradtsevich
+ */
+public class JBIDE3734Test extends VpeTest {
+ private static final String TEST_FILE_NAME = "JBIDE3734.xhtml"; //$NON-NLS-1$
+ private static final String CSS_FILE_NAME = "page.css"; //$NON-NLS-1$
+ private final String TEST_FOLDER_PATH = "JBIDE/3734/"; //$NON-NLS-1$
+ public JBIDE3734Test(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests if attributes of a4j:page are rendered to visual BODY element.
+ *
+ * @throws Throwable
+ */
+ public void testBodyAttributes() throws Throwable {
+ setException(null);
+ VpeController vpeController = openTestPage();
+ nsIDOMElement body = vpeController.getVisualBuilder().getContentArea();
+
+ assertEquals("bold", body.getAttribute(HTML.ATTR_CLASS));
//$NON-NLS-1$
+ assertEquals("background-color: black;",
body.getAttribute(HTML.ATTR_STYLE)); //$NON-NLS-1$
+
+ if(getException()!=null) {
+ throw getException();
+ }
+ }
+
+ /**
+ * Tests if CSS link from a4j:page head facet is linked to the page.
+ *
+ * @throws Throwable
+ */
+ public void testLink() throws Throwable {
+ setException(null);
+ VpeController vpeController = openTestPage();
+ nsIDOMElement head = (nsIDOMElement) vpeController
+ .getVisualBuilder()
+ .getHeadNode()
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ nsIDOMNodeList links = head.getElementsByTagName(HTML.TAG_STYLE);
+ boolean pageCssLinkFound = false;
+ for (int i = 0; i < links.getLength(); i++) {
+ final String href = ((nsIDOMElement) links.item(i)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID))
+ .getAttribute(HTML.ATTR_HREF);
+ if (href != null && href.contains(TEST_FOLDER_PATH + CSS_FILE_NAME)) {
+ pageCssLinkFound = true;
+ break;
+ }
+ }
+
+ assertTrue("CSS link to 'page.css' is not found",
pageCssLinkFound); //$NON-NLS-1$
+
+ if(getException()!=null) {
+ throw getException();
+ }
+ }
+
+ private VpeController openTestPage() throws CoreException,
+ PartInitException {
+ IFile ifile = (IFile) TestUtil.getComponentPath(TEST_FOLDER_PATH + TEST_FILE_NAME,
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ IEditorInput input = new FileEditorInput(ifile);
+ JSPMultiPageEditor part = openEditor(input);
+ VpeController vpeController = TestUtil.getVpeController(part);
+ return vpeController;
+ }
+}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -1321,7 +1321,7 @@
return getContentArea().equals(visualNode);
}
- nsIDOMElement getContentArea() {
+ public nsIDOMElement getContentArea() {
return visualEditor.getContentArea();
}
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractBodyTemplate.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNamedNodeMap;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMNodeList;
+import org.mozilla.xpcom.XPCOMException;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * This abstract class is intended to provide a common way to implement templates
+ * that have to render their contents into the {@code BODY}-element of the page.
+ *
+ * In most cases only the method {@code #getTargetAttributeName(String)} should be
+ * implemented.
+ *
+ * @author ezheleznyakov(a)exadel.com
+ * @author yradtsevich
+ */
+public abstract class VpeAbstractBodyTemplate extends VpeAbstractTemplate {
+
+ /**
+ * This method should return target attribute name for the given
+ * source attribute name.
+ *
+ * @return target attribute name, or {@code null} if the attribute
+ * have to be omitted.
+ */
+ abstract protected String getTargetAttributeName(String sourceAttributeName);
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ final nsIDOMElement body = getBody(visualDocument.getDocumentElement());
+ cleanBody(body);
+
+ final nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ final NamedNodeMap sourceNodeAttributes = sourceNode.getAttributes();
+ for (int i = 0; i < sourceNodeAttributes.getLength(); i++) {
+ final Node sourceAttribute = sourceNodeAttributes.item(i);
+ final String sourceAttributeName = sourceAttribute.getNodeName();
+ String attributeValue = sourceAttribute.getNodeValue();
+
+ final String targetAttributeName = getTargetAttributeName(sourceAttributeName);
+
+ if (targetAttributeName != null) {
+ if(HTML.ATTR_ID.equalsIgnoreCase(targetAttributeName)) {
+ div.setAttribute(HTML.ATTR_ID, attributeValue);
+ } else {
+ // all full path for 'url'
+ if (VpeStyleUtil.ATTRIBUTE_STYLE.equalsIgnoreCase(targetAttributeName))
+ attributeValue = VpeStyleUtil.addFullPathIntoURLValue(attributeValue,
pageContext);
+ if (VpeStyleUtil.PARAMETR_BACKGROND.equalsIgnoreCase(targetAttributeName))
+ attributeValue = VpeStyleUtil.addFullPathIntoBackgroundValue(attributeValue,
+ pageContext.getEditPart().getEditorInput());
+ //FIX FOR JBIDE-1568, added by Max Areshkau
+ try {
+ body.setAttribute(targetAttributeName, attributeValue);
+ } catch(XPCOMException ex ) {
+ //jsut ignore it
+ }
+ }
+ }
+ }
+
+ return new VpeCreationData(div);
+ }
+
+ /**
+ * Deletes all attributes except ID from the {@code body}
+ *
+ * @param body BODY-element
+ */
+ protected void cleanBody(final nsIDOMElement body) {
+ nsIDOMNamedNodeMap attributes = body.getAttributes();
+
+ long len = attributes.getLength();
+ int j = 0;
+ for (int i = 0; i < len; i++) {
+ nsIDOMNode attr = attributes.item(j);
+ if (HTML.ATTR_ID.equalsIgnoreCase(attr.getNodeName())) {
+ j++;
+ } else {
+ body.removeAttribute(attr.getNodeName());
+ }
+ }
+ }
+
+ /**
+ * Finds {@code BODY}-element
+ *
+ * @param node a visual node
+ * @return the nearest child of {@code node} named {@code 'BODY'}
+ */
+ protected static nsIDOMElement getBody(nsIDOMNode node) {
+
+ final nsIDOMNodeList nodeChildren = node.getChildNodes();
+ for (int i = 0; i < nodeChildren.getLength(); i++) {
+ final nsIDOMNode nodeChild = nodeChildren.item(i);
+ if (HTML.TAG_BODY.equalsIgnoreCase(nodeChild
+ .getNodeName())) {
+ return (nsIDOMElement) nodeChild
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ } else {
+ nsIDOMElement body = getBody(nodeChild);
+ if (body != null) {
+ return body;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
+
+ /**
+ * Cleans the visual {@code BODY}-element before the source element is removed.
+ */
+ @Override
+ public void beforeRemove(VpePageContext pageContext, Node sourceNode,
+ nsIDOMNode visualNode, Object data) {
+ final nsIDOMElement body =
getBody(visualNode.getOwnerDocument().getDocumentElement());
+ cleanBody(body);
+ }
+}
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 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -90,6 +90,7 @@
public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
public static final String ATTR_DISABLED = "disabled"; //$NON-NLS-1$
public static final String ATTR_FRAME = "frame"; //$NON-NLS-1$
+ public static final String ATTR_HREF = "href"; //$NON-NLS-1$
public static final String ATTR_ROWSPAN = "rowspan"; //$NON-NLS-1$
public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
public static final String ATTR_COLS = "cols"; //$NON-NLS-1$
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java 2009-02-06
16:17:14 UTC (rev 13514)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java 2009-02-06
16:35:31 UTC (rev 13515)
@@ -10,102 +10,19 @@
******************************************************************************/
package org.jboss.tools.vpe.html.template;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNamedNodeMap;
-import org.mozilla.interfaces.nsIDOMNode;
-import org.mozilla.interfaces.nsIDOMNodeList;
-import org.mozilla.xpcom.XPCOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
+import org.jboss.tools.vpe.editor.template.VpeAbstractBodyTemplate;
/**
* @author ezheleznyakov(a)exadel.com
+ * @author yradtsevich
*/
-public class HtmlBodyTemplate extends VpeAbstractTemplate {
+public class HtmlBodyTemplate extends VpeAbstractBodyTemplate {
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
- final nsIDOMElement body = getBody(visualDocument.getDocumentElement());
-
- nsIDOMNamedNodeMap attrsMap = body.getAttributes();
- long len = attrsMap.getLength();
- int j = 0;
- for (int i = 0; i < len; i++) {
- nsIDOMNode attr = attrsMap.item(j);
- if (HTML.ATTR_ID.equalsIgnoreCase(attr.getNodeName())) {
- j++;
- } else {
- body.removeAttribute(attr.getNodeName());
- }
- }
-
- final nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- final NamedNodeMap sourceNodeAttributes = sourceNode.getAttributes();
- for (int i = 0; i < sourceNodeAttributes.getLength(); i++) {
- final Node sourceNodeAttribute = sourceNodeAttributes.item(i);
- final String name = sourceNodeAttribute.getNodeName();
- String value = sourceNodeAttribute.getNodeValue();
- if(HTML.ATTR_ID.equalsIgnoreCase(name)) {
- div.setAttribute(HTML.ATTR_ID, value);
- } else {
- // all full path for 'url'
- if (VpeStyleUtil.ATTRIBUTE_STYLE.equalsIgnoreCase(name))
- value = VpeStyleUtil.addFullPathIntoURLValue(value,
- pageContext);
- if (VpeStyleUtil.PARAMETR_BACKGROND.equalsIgnoreCase(name))
- value = VpeStyleUtil.addFullPathIntoBackgroundValue(value,
- pageContext.getEditPart().getEditorInput());
- //FIX FOR JBIDE-1568, added by Max Areshkau
- try{
- body.setAttribute(name, value);
- }catch(XPCOMException ex ) {
- //jsut ignore it
- }
- }
- }
-
- return new VpeCreationData(div);
- }
-
/**
- * Finds {@code BODY}-element
- *
- * @param node a visual node
- * @return the nearest child of {@code node} named {@code 'BODY'}
- */
- private nsIDOMElement getBody(nsIDOMNode node) {
-
- final nsIDOMNodeList nodeChildren = node.getChildNodes();
- for (int i = 0; i < nodeChildren.getLength(); i++) {
- final nsIDOMNode nodeChild = nodeChildren.item(i);
- if (HTML.TAG_BODY.equalsIgnoreCase(nodeChild
- .getNodeName())) {
- return (nsIDOMElement) nodeChild
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- } else {
- nsIDOMElement body = getBody(nodeChild);
- if (body != null) {
- return body;
- }
- }
- }
-
- return null;
- }
-
- /**
* {@inheritDoc}
*/
- public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
+ @Override
+ protected String getTargetAttributeName(String sourceAttributeName) {
+ return sourceAttributeName;
}
}
\ No newline at end of file