Author: nbelaevski
Date: 2011-02-24 07:01:51 -0500 (Thu, 24 Feb 2011)
New Revision: 21912
Added:
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/treeNode-serverEventListeners-props.xml
Modified:
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java
Log:
https://issues.jboss.org/browse/RF-10594
https://issues.jboss.org/browse/RF-10603
Modified:
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
===================================================================
---
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2011-02-24
11:11:26 UTC (rev 21911)
+++
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2011-02-24
12:01:51 UTC (rev 21912)
@@ -30,7 +30,6 @@
import javax.el.ELContext;
import javax.el.ELException;
-import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
@@ -57,7 +56,6 @@
import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.cdk.annotations.Signature;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.component.util.MessageUtil;
import org.richfaces.context.ExtendedVisitContext;
@@ -92,7 +90,8 @@
family = AbstractTree.COMPONENT_FAMILY,
tag = @Tag(name = "tree", handler =
"org.richfaces.view.facelets.TreeHandler"),
renderer = @JsfRenderer(type = "org.richfaces.TreeRenderer"),
- attributes = {"ajax-props.xml", "events-props.xml",
"core-props.xml", "i18n-props.xml", "tree-common-props.xml",
"rowKeyConverter-prop.xml"}
+ attributes = {"ajax-props.xml", "events-props.xml",
"core-props.xml", "i18n-props.xml", "tree-common-props.xml",
+ "rowKeyConverter-prop.xml",
"tree-serverEventListeners-props.xml"}
)
//TODO add rowData caching for wrapper events
public abstract class AbstractTree extends UIDataAdaptor implements
MetaComponentResolver, MetaComponentEncoder, TreeSelectionChangeSource, TreeToggleSource
{
@@ -138,14 +137,6 @@
selection
}
- @SuppressWarnings("unused")
- @Attribute(generate = false, signature = @Signature(returnType = Void.class,
parameters = TreeSelectionChangeEvent.class))
- private MethodExpression selectionChangeListener;
-
- @SuppressWarnings("unused")
- @Attribute(generate = false, signature = @Signature(returnType = Void.class,
parameters = TreeToggleListener.class))
- private MethodExpression toggleListener;
-
private transient TreeRange treeRange;
private transient UIComponent currentComponent = this;
@@ -203,6 +194,7 @@
return COMPONENT_FAMILY;
}
+ @Attribute
public Collection<Object> getSelection() {
@SuppressWarnings("unchecked")
Collection<Object> selection = (Collection<Object>)
getStateHelper().eval(PropertyKeys.selection);
Modified:
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java
===================================================================
---
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java 2011-02-24
11:11:26 UTC (rev 21911)
+++
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java 2011-02-24
12:01:51 UTC (rev 21912)
@@ -23,7 +23,6 @@
import java.io.IOException;
-import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
@@ -40,7 +39,6 @@
import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.cdk.annotations.Signature;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.context.ExtendedVisitContext;
import org.richfaces.context.ExtendedVisitContextMode;
@@ -58,7 +56,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", "tree-common-props.xml"}
+ attributes = {"events-props.xml", "core-props.xml",
"i18n-props.xml", "tree-common-props.xml",
"treeNode-serverEventListeners-props.xml"}
)
public abstract class AbstractTreeNode extends UIComponentBase implements
MetaComponentResolver, MetaComponentEncoder, IterationStateHolder, TreeToggleSource {
@@ -72,9 +70,6 @@
expanded
}
- @Attribute(generate = false, signature = @Signature(returnType = Void.class,
parameters = TreeToggleEvent.class))
- private MethodExpression toggleListener;
-
public AbstractTreeNode() {
setRendererType("org.richfaces.TreeNodeRenderer");
}
Added:
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml
===================================================================
---
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml
(rev 0)
+++
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml 2011-02-24
12:01:51 UTC (rev 21912)
@@ -0,0 +1,34 @@
+<?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>selectionChangeListener</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ <property-extension>
+ <cdk:generate>false</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
+ <property-name>toggleListener</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ <property-extension>
+ <cdk:generate>false</cdk:generate>
+ </property-extension>
+ </property>
+
+</cdk:properties>
Added:
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/treeNode-serverEventListeners-props.xml
===================================================================
---
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/treeNode-serverEventListeners-props.xml
(rev 0)
+++
branches/4.0.0.CR1/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/treeNode-serverEventListeners-props.xml 2011-02-24
12:01:51 UTC (rev 21912)
@@ -0,0 +1,27 @@
+<?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>toggleListener</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ <property-extension>
+ <cdk:generate>false</cdk:generate>
+ </property-extension>
+ </property>
+
+</cdk:properties>