Author: nbelaevski
Date: 2011-01-10 17:19:53 -0500 (Mon, 10 Jan 2011)
New Revision: 20937
Added:
trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-common-props.xml
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
Log:
https://issues.jboss.org/browse/RF-10041
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 2011-01-10
16:47:16 UTC (rev 20936)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2011-01-10
22:19:53 UTC (rev 20937)
@@ -92,7 +92,7 @@
family = AbstractTree.COMPONENT_FAMILY,
tag = @Tag(name = "tree", handler =
"org.richfaces.view.facelets.TreeHandler"),
renderer = @JsfRenderer(type = "org.richfaces.TreeRenderer"),
- attributes = {"events-props.xml", "core-props.xml",
"i18n-props.xml"}
+ attributes = {"ajax-props.xml", "events-props.xml",
"core-props.xml", "i18n-props.xml",
"tree-common-props.xml"}
)
//TODO add rowData caching for wrapper events
public abstract class AbstractTree extends UIDataAdaptor implements
MetaComponentResolver, MetaComponentEncoder, TreeSelectionChangeSource, TreeToggleSource
{
@@ -165,24 +165,15 @@
return treeRange;
}
+ @Attribute
public abstract Object getValue();
+ @Attribute
public abstract boolean isImmediate();
- public abstract String getIconLeaf();
-
- public abstract String getIconExpanded();
-
- public abstract String getIconCollapsed();
-
+ @Attribute
public abstract String getNodeClass();
- public abstract String getHandleClass();
-
- public abstract String getIconClass();
-
- public abstract String getLabelClass();
-
@Attribute(events = @EventName("nodetoggle"))
public abstract String getOnnodetoggle();
@@ -201,27 +192,12 @@
@Attribute
public abstract SwitchType getSelectionType();
+ @Attribute
public abstract String getNodeType();
+ @Attribute
public abstract String getToggleNodeEvent();
- public abstract Object getExecute();
-
- public abstract Object getRender();
-
- public abstract boolean isLimitRender();
-
- @Attribute(events = @EventName("begin"))
- public abstract String getOnbegin();
-
- @Attribute(events = @EventName("beforedomupdate"))
- public abstract String getOnbeforedomupdate();
-
- @Attribute(events = @EventName("complete"))
- public abstract String getOncomplete();
-
- public abstract String getStatus();
-
@Override
public String getFamily() {
return COMPONENT_FAMILY;
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 2011-01-10
16:47:16 UTC (rev 20936)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java 2011-01-10
22:19:53 UTC (rev 20937)
@@ -58,7 +58,7 @@
family = AbstractTreeNode.COMPONENT_FAMILY,
tag = @Tag(name = "treeNode", handler =
"org.richfaces.view.facelets.TreeNodeHandler"),
renderer = @JsfRenderer(type = "org.richfaces.TreeNodeRenderer"),
- attributes = {"events-props.xml", "core-props.xml",
"i18n-props.xml"}
+ attributes = {"events-props.xml", "core-props.xml",
"i18n-props.xml", "tree-common-props.xml"}
)
public abstract class AbstractTreeNode extends UIComponentBase implements
MetaComponentResolver, MetaComponentEncoder, IterationStateHolder, TreeToggleSource {
@@ -87,20 +87,9 @@
@Attribute
public abstract boolean isImmediate();
+ @Attribute
public abstract String getType();
- public abstract String getIconLeaf();
-
- public abstract String getIconExpanded();
-
- public abstract String getIconCollapsed();
-
- public abstract String getHandleClass();
-
- public abstract String getIconClass();
-
- public abstract String getLabelClass();
-
@Attribute(events = @EventName("toggle"))
public abstract String getOntoggle();
@@ -111,6 +100,7 @@
return (Boolean) getStateHelper().get(PropertyKeys.expanded);
}
+ @Attribute
public boolean isExpanded() {
FacesContext context = getFacesContext();
Boolean localExpandedValue = getLocalExpandedValue(context);
Copied:
trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-common-props.xml
(from rev 20836,
trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-common-props.xml)
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-common-props.xml
(rev 0)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-common-props.xml 2011-01-10
22:19:53 UTC (rev 20937)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright ${year}, Red Hat,
+ Inc. and individual contributors by the @authors tag. See the copyright.txt
+ in the distribution for a full listing of individual contributors. This is
+ free software; you can redistribute it and/or modify it under the terms of
+ the GNU Lesser General Public License as published by the Free Software Foundation;
+ either version 2.1 of the License, or (at your option) any later version.
+ This software is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ details. You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the
+ FSF site:
http://www.fsf.org. -->
+<cdk:properties
xmlns:xi="http://www.w3.org/2001/XInclude"
+
xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee">
+
+ <property>
+ <property-name>iconLeaf</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>iconExpanded</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>iconCollapsed</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+
+ <property>
+ <property-name>handleClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>iconClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>labelClass</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+
+</cdk:properties>