Author: akazakov
Date: 2008-02-08 12:08:48 -0500 (Fri, 08 Feb 2008)
New Revision: 6214
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JsfHtmlBasic1_2.xml
trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1765 Sinchronized JSF 1.1 and JSF 1.2 tag libs for
KB. Since that if user add "h:outputText" tag using Ctrl+Space or Palette then
we add <h:outputText value=""/> instead of <h:outputText
value=""></h:outputText>. Now it works for JSF 1.2. as it worked for
JSF 1.1
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JsfHtmlBasic1_2.xml
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JsfHtmlBasic1_2.xml 2008-02-08
16:25:22 UTC (rev 6213)
+++
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JsfHtmlBasic1_2.xml 2008-02-08
17:08:48 UTC (rev 6214)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kb-schema PUBLIC "-//Red Hat, Inc//DTD Knowledge Base 1.0//EN"
"http://www.redhat.com/dtds/kb-schema_1_0.dtd">
<schema location="" prefix="h"
uri="http://java.sun.com/jsf/html" version="1.2">
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="commandButton" start-tag="required">
<description><p>Renders an HTML "input"
element.</p>
@@ -1485,7 +1485,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="graphicImage" start-tag="required">
<description>Renders an HTML "img" element. Render
the clientId as the value of the "id" attribute. Render the
@@ -1725,7 +1725,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="inputHidden" start-tag="required">
<description><p>Renders an HTML "input" element of
type
"hidden".</p>
@@ -1869,7 +1869,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="inputSecret" start-tag="required">
<description><p>Renders an HTML "input" element of
"type" "password".</p>
@@ -2274,7 +2274,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="inputText" start-tag="required">
<description><p>Renders an HTML "input"
element of "type" "text".</p>
@@ -3029,7 +3029,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="message" start-tag="required">
<description><p>Render a single message for a specific
component.</p>
@@ -3265,7 +3265,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="messages" start-tag="required">
<description><p>The same as for the Message renderer, but
output all the
messages. If the value of the "layout" attribute is
"table",
@@ -3481,7 +3481,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="outputFormat" start-tag="required">
<description><p>Render parameterized text. Obtain the
<code>style</code>,
<code>styleClass</code>,
<code>dir</code>, and
@@ -4130,7 +4130,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="outputText" start-tag="required">
<description>If the "styleClass", "style",
"dir" or "lang"
attributes are present, render a "span" element. If the
@@ -4649,7 +4649,7 @@
</attribute-type>
<attribute type="binding"/>
</element-type>
- <element-type body-content="allowed" content="mixed"
end-tag="required"
+ <element-type body-content="refused" content="mixed"
end-tag="required"
name="selectBooleanCheckbox" start-tag="required">
<description><p>Renders an HTML "input" element of
type "checkbox".</p>
Modified:
trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java
===================================================================
---
trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java 2008-02-08
16:25:22 UTC (rev 6213)
+++
trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java 2008-02-08
17:08:48 UTC (rev 6214)
@@ -21,6 +21,7 @@
import org.jboss.tools.common.kb.KbQuery;
import org.jboss.tools.common.kb.KbResource;
import org.jboss.tools.common.kb.KbTldResource;
+import org.jboss.tools.common.kb.TagDescriptor;
import org.jboss.tools.common.kb.test.resources.TestBeanPropertyResource;
import org.jboss.tools.common.kb.test.resources.TestBundleNameResource;
import org.jboss.tools.common.kb.test.resources.TestBundlePropertyResource;
@@ -36,6 +37,22 @@
private JspWtpKbConnector connector = new JspWtpKbConnector();
+ /**
+ * Test for
http://jira.jboss.com/jira/browse/JBIDE-1765
+ */
+ public void testJBIDE1765() {
+ KbResource jsfHtmlTld = new
KbTldResource("http://java.sun.com/jsf/html",
null, "h", "1.2");
+ connector.registerResource(jsfHtmlTld, true);
+ String query = KbQuery.TAG_SEPARATOR + "h" + KbQuery.PREFIX_SEPARATOR +
"outputText";
+ try {
+ TagDescriptor tag = connector.getTagInformation(query);
+ assertNotNull("Can't get tag descriptor for " + query, tag);
+ assertFalse(query + " has tag body.", tag.hasBody());
+ } catch (KbException e) {
+ fail("Can't get tag descriptor for " + query + ": " +
e.getMessage());
+ }
+ }
+
public void testQueries() {
KbResource jsfHtmlTld = new
KbTldResource("http://java.sun.com/jsf/html",
null, "h", "1.2");
KbResource jsfCoreTld = new
KbTldResource("http://java.sun.com/jsf/core",
null, "f", "1.2");