Author: lfryc(a)redhat.com
Date: 2010-12-13 13:44:55 -0500 (Mon, 13 Dec 2010)
New Revision: 20539
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/treeAdaptors.xhtml
Log:
rich:tree adaptors - added possibility to test @rendered (RF-9698
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java 2010-12-13
18:44:26 UTC (rev 20538)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTreeModelAdaptorBean.java 2010-12-13
18:44:55 UTC (rev 20539)
@@ -53,6 +53,7 @@
logger.debug("initializing bean " + getClass().getName());
attributes = Attributes.getUIComponentAttributes(UITreeModelAdaptor.class,
getClass(), false);
+ attributes.setAttribute("rendered", true);
}
public Attributes getAttributes() {
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/treeAdaptors.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/treeAdaptors.xhtml 2010-12-13
18:44:26 UTC (rev 20538)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTree/treeAdaptors.xhtml 2010-12-13
18:44:55 UTC (rev 20539)
@@ -77,7 +77,6 @@
roots="#{richTreeModelRecursiveAdaptorBean.rootNodes}"
nodes="#{node.recursive}"
recursionOrder="#{richTreeModelRecursiveAdaptorBean.attributes['recursionOrder'].value}"
-
rendered="#{richTreeModelRecursiveAdaptorBean.attributes['rendered'].value}"
<rich:treeNode rendered="#{node.class.simpleName !=
'RecursiveNode' || node.number != 1 ||
richTreeNodeBean.attributes['rendered'].value}">
@@ -92,13 +91,13 @@
</rich:treeNode>
</rich:treeModelAdaptor>-->
- <rich:treeModelAdaptor nodes="#{node.model.list}">
+ <rich:treeModelAdaptor nodes="#{node.model.list}"
rendered="#{richTreeModelAdaptorBean.attributes['rendered'].value}">
<rich:treeNode>
#{node.label}
</rich:treeNode>
</rich:treeModelAdaptor>
- <rich:treeModelRecursiveAdaptor
roots="#{node.model.recursive}" nodes="#{node.recursive}">
+ <rich:treeModelRecursiveAdaptor
roots="#{node.model.recursive}" nodes="#{node.recursive}"
rendered="#{richTreeModelRecursiveAdaptorBean.attributes['rendered'].value}">
<rich:treeNode
rendered="#{richTreeNodeBean.attributes['rendered'].value || node.number !=
1}">
#{node.label}
</rich:treeNode>
@@ -114,21 +113,32 @@
<h:outputLabel value="Selection: " />
<h:outputText value="#{richTreeBean.selection}" />
</a4j:outputPanel>
-
+
<fieldset>
<legend>rich:tree</legend>
- <metamer:attributes value="#{richTreeBean.attributes}"
id="treeAttributes" />
+
+ <fieldset>
+ <legend>rich:treeModelRecursiveAdaptor [1]</legend>
+
+ <fieldset>
+ <legend>rich:treeNode</legend>
+ <metamer:attributes value="#{richTreeNodeBean.attributes}"
id="nodeAttributes" />
+ </fieldset>
+
+ <fieldset>
+ <legend>rich:treeModelAdaptor</legend>
+ <metamer:attributes
value="#{richTreeModelAdaptorBean.attributes}" id="listAttributes"
/>
+ </fieldset>
+
+ <fieldset>
+ <legend>rich:treeModelRecursiveAdaptor [2]</legend>
+ <metamer:attributes
value="#{richTreeModelRecursiveAdaptorBean.attributes}"
id="recursiveAttributes" />
+ </fieldset>
+ </fieldset>
+
+ <metamer:attributes value="#{richTreeBean.attributes}"
id="treeAttributes" />
</fieldset>
- <fieldset>
- <legend>rich:treeModelRecursiveAdaptor</legend>
- <metamer:attributes
value="#{richTreeModelRecursiveAdaptorBean.attributes}"
id="nodeAttributes" />
- </fieldset>
-
- <fieldset>
- <legend>rich:treeNode</legend>
- <metamer:attributes value="#{richTreeNodeBean.attributes}"
id="recursiveAttributes" />
- </fieldset>
</ui:define>
</ui:composition>