Author: sergeyhalipov
Date: 2008-03-05 15:26:30 -0500 (Wed, 05 Mar 2008)
New Revision: 6577
Modified:
trunk/ui/tree/src/main/config/component/treeNode.xml
trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
Log:
http://jira.jboss.com/jira/browse/RF-765
http://jira.jboss.com/jira/browse/RF-2315
Modified: trunk/ui/tree/src/main/config/component/treeNode.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/treeNode.xml 2008-03-05 19:29:04 UTC (rev
6576)
+++ trunk/ui/tree/src/main/config/component/treeNode.xml 2008-03-05 20:26:30 UTC (rev
6577)
@@ -186,6 +186,23 @@
Data to be processed after a drop event
</description>
<defaultvalue>getUITree().getDropValue()</defaultvalue>
+ </property>
+
+ <property>
+ <name>timeout</name>
+ <classname>int</classname>
+ <description>timeout in ms.</description>
+ <defaultvalue>getDefaultTimeout()</defaultvalue>
+ </property>
+ <property>
+ <name>reRender</name>
+ <classname>java.lang.Object</classname>
+ <description>
+ Id['s] (in format of call UIComponent.findComponent()) of components,
+ rendered in case of AjaxRequest caused by this component.
+ Can be single id, comma-separated list of Id's, or EL Expression with array or
Collection
+ </description>
+ <defaultvalue>getDefaultReRender()</defaultvalue>
</property>
&html_events;
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2008-03-05
19:29:04 UTC (rev 6576)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2008-03-05
20:26:30 UTC (rev 6577)
@@ -304,11 +304,12 @@
}
public Object saveState(FacesContext context) {
- Object[] state = new Object[4];
+ Object[] state = new Object[5];
state[0] = super.saveState(context);
state[1] = this.dragType;
state[2] = this.acceptedTypes;
state[3] = this.dragIndicator;
+ state[4] = this.reRender;
return state;
}
@@ -319,6 +320,7 @@
this.dragType = (String) _state[1];
this.acceptedTypes = _state[2];
this.dragIndicator = (String) _state[3];
+ this.reRender = (Object) _state[4];
}
public void setDragIndicator(String dragIndicator) {
@@ -420,6 +422,22 @@
return tree.getOndropend();
}
+ protected int getDefaultTimeout() {
+ UITree tree = getUITree();
+ if (tree == null) {
+ return 0;
+ }
+ return tree.getTimeout();
+ }
+
+ protected Object getDefaultReRender() {
+ UITree tree = getUITree();
+ if (tree == null) {
+ return null;
+ }
+ return tree.getReRender();
+ }
+
/**
* if "true", submits ONLY one field/link, instead of all form controls
* Setter for ajaxSingle