Author: nbelaevski
Date: 2010-11-02 11:12:58 -0400 (Tue, 02 Nov 2010)
New Revision: 19893
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java
trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml
Log:
Added styleClass attribute for rich:tree & rich:treeNode
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2010-11-02
14:43:10 UTC (rev 19892)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2010-11-02
15:12:58 UTC (rev 19893)
@@ -158,6 +158,9 @@
public abstract String getNodeType();
+ //TODO - move to template
+ public abstract String getStyleClass();
+
public Collection<Object> getSelection() {
@SuppressWarnings("unchecked")
Collection<Object> selection = (Collection<Object>)
getStateHelper().eval(PropertyKeys.selection);
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java 2010-11-02
14:43:10 UTC (rev 19892)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java 2010-11-02
15:12:58 UTC (rev 19893)
@@ -63,6 +63,9 @@
public abstract String getType();
+ //TODO - move to template
+ public abstract String getStyleClass();
+
protected AbstractTree findTreeComponent() {
UIComponent c = this;
while (c != null && !(c instanceof AbstractTree)) {
Modified: trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml 2010-11-02 14:43:10 UTC
(rev 19892)
+++ trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml 2010-11-02 15:12:58 UTC
(rev 19893)
@@ -8,7 +8,7 @@
<cc:interface>
<cdk:class>org.richfaces.renderkit.html.TreeNodeRenderer
</cdk:class>
- <cdk:superclass>javax.faces.render.Renderer</cdk:superclass>
+
<cdk:superclass>org.richfaces.renderkit.RendererBase</cdk:superclass>
<cdk:component-family>org.richfaces.TreeNode
</cdk:component-family>
<cdk:renderer-type>org.richfaces.TreeNodeRenderer
@@ -16,7 +16,7 @@
</cc:interface>
<cc:implementation>
- <div class="rf-trn">
+ <div class="#{concatClasses('rf-trn',
component.attributes['styleClass'])}">
<span class="rf-trn-hnd
#{facesContext.attributes['__treeNodeHandleClass']}" />
<span class="rf-trn-cnt">
<span class="rf-trn-ico
#{facesContext.attributes['__treeNodeIconClass']}" />
Show replies by date