Author: yradtsevich
Date: 2008-12-08 14:54:59 -0500 (Mon, 08 Dec 2008)
New Revision: 12473
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
Log:
RESOLVED - issue JBIDE-3265: rich:dataDefenitionList bugs.
https://jira.jboss.org/jira/browse/JBIDE-3265
Tests of rich:dataDefenitionList have been fixed.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java 2008-12-08
19:31:53 UTC (rev 12472)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java 2008-12-08
19:54:59 UTC (rev 12473)
@@ -37,7 +37,10 @@
*/
public class RichFacesDataDefinitionListTemplate extends VpeAbstractTemplate {
- private static final String FACET_DEFINITION = "facet";
+ /**
+ *
+ */
+ private static final String DEFAULT_DD_CLASS = "columnClass"; //$NON-NLS-1$
private static final String FACET_URI = "http://java.sun.com/jsf/core";
private static final String FACET_NAME_ATTR = "name";
private static final String FACET_NAME_ATTR_VALUE = "term";
@@ -84,7 +87,7 @@
}
child = (Element) nodeChild;
- if (!child.getLocalName().equals(FACET_DEFINITION)) {
+ if (!child.getLocalName().equals(RichFaces.TAG_FACET)) {
dataDefinitionElements.add(child);
} else if (facetElement == null
&& (FACET_URI.equals(pageContext.getSourceTaglibUri(child)))
@@ -120,7 +123,7 @@
}
if (!dataDefinitionElements.isEmpty()) {
- String ddClass = "columnClass";
+ String ddClass = DEFAULT_DD_CLASS;
if (rowClassesSize > 0) {
ddClass+= " " + rowClasses.get(row % rowClassesSize); //$NON-NLS-1$
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml 2008-12-08
19:31:53 UTC (rev 12472)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml 2008-12-08
19:54:59 UTC (rev 12473)
@@ -7,14 +7,28 @@
xmlns:rich="http://richfaces.org/rich">
<head>
+ <style type="text/css">
+ .red-text {
+ color:red;
+ }
+ .blue-text {
+ color:blue;
+ }
+ .yellow-background {
+ background-color: yellow;
+ }
+ </style>
</head>
<body>
<f:view>
- <rich:dataDefinitionList id="dataDefinitionList" rows="5">
- <h:outputText value="row=1" />
- <h:outputText value="row=2" />
- <h:outputText value="row=3" />
- <h:outputText value="row=4" />
+ <rich:dataDefinitionList id="dataDefinitionList" rows="5"
+ styleClass="yellow-background" rowClasses="red-text,
blue-text">
+ <f:facet name="term"><h:outputText
value="TERM-VISIBLE"/></f:facet>
+ <f:facet name="term"><h:outputText
value="TERM-INVISIBLE"/></f:facet>
+ <h:outputText value="col1" />
+ <h:outputText value="col2" />
+ <h:outputText value="col3" />
+ <h:outputText value="col4" />
</rich:dataDefinitionList>
</f:view>
</body>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2008-12-08
19:31:53 UTC (rev 12472)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2008-12-08
19:54:59 UTC (rev 12473)
@@ -1,18 +1,112 @@
<tests>
<test id="dataDefinitionList">
- <DL CLASS="listClass">
- <DD CLASS="columnClass">
- <SPAN> row=1 </SPAN>
+
+ <DL CLASS="yellow-background">
+ <DT CLASS="headerClass">
+ <DIV>
+ <SPAN>
+ TERM-VISIBLE
+</SPAN>
+ </DIV>
+ </DT>
+ <DD CLASS="columnClass red-text">
+ <SPAN>
+ col1
+</SPAN>
+ <SPAN>
+ col2
+</SPAN>
+ <SPAN>
+ col3
+</SPAN>
+ <SPAN>
+ col4
+</SPAN>
</DD>
- <DD CLASS="columnClass">
- <SPAN> row=2 </SPAN>
+ <DT CLASS="headerClass">
+ <DIV>
+ <SPAN>
+ TERM-VISIBLE
+</SPAN>
+ </DIV>
+ </DT>
+ <DD CLASS="columnClass blue-text">
+ <SPAN>
+ col1
+</SPAN>
+ <SPAN>
+ col2
+</SPAN>
+ <SPAN>
+ col3
+</SPAN>
+ <SPAN>
+ col4
+</SPAN>
</DD>
- <DD CLASS="columnClass">
- <SPAN> row=3 </SPAN>
+ <DT CLASS="headerClass">
+ <DIV>
+ <SPAN>
+ TERM-VISIBLE
+</SPAN>
+ </DIV>
+ </DT>
+ <DD CLASS="columnClass red-text">
+ <SPAN>
+ col1
+</SPAN>
+ <SPAN>
+ col2
+</SPAN>
+ <SPAN>
+ col3
+</SPAN>
+ <SPAN>
+ col4
+</SPAN>
</DD>
- <DD CLASS="columnClass">
- <SPAN> row=4 </SPAN>
+ <DT CLASS="headerClass">
+ <DIV>
+ <SPAN>
+ TERM-VISIBLE
+</SPAN>
+ </DIV>
+ </DT>
+ <DD CLASS="columnClass blue-text">
+ <SPAN>
+ col1
+</SPAN>
+ <SPAN>
+ col2
+</SPAN>
+ <SPAN>
+ col3
+</SPAN>
+ <SPAN>
+ col4
+</SPAN>
</DD>
+ <DT CLASS="headerClass">
+ <DIV>
+ <SPAN>
+ TERM-VISIBLE
+</SPAN>
+ </DIV>
+ </DT>
+ <DD CLASS="columnClass red-text">
+ <SPAN>
+ col1
+</SPAN>
+ <SPAN>
+ col2
+</SPAN>
+ <SPAN>
+ col3
+</SPAN>
+ <SPAN>
+ col4
+</SPAN>
+ </DD>
</DL>
</test>
</tests>
\ No newline at end of file