Author: sergeyhalipov
Date: 2007-09-21 10:09:05 -0400 (Fri, 21 Sep 2007)
New Revision: 3048
Modified:
branches/3.1.x/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
Log:
Add fix for RF-765 to branch 3.1.1
Modified: branches/3.1.x/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
===================================================================
---
branches/3.1.x/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-09-21
14:00:06 UTC (rev 3047)
+++
branches/3.1.x/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-09-21
14:09:05 UTC (rev 3048)
@@ -36,6 +36,26 @@
private Object acceptedTypes;
private String dragIndicator;
+ private boolean ajaxSingle = false;
+ private boolean bypassUpdates = false;
+ private boolean limitToList = false;
+ private Object reRender = null;
+ private String status = null;
+ private String eventsQueue = null;
+ private int requestDelay = Integer.MIN_VALUE;
+ private String oncomplete = null;
+ private String focus = null;
+ private Object data = null;
+ private boolean ignoreDupResponses = false;
+ private int timeout = Integer.MIN_VALUE;
+
+ private boolean ajaxSingleSet = false;
+ private boolean bypassUpdatesSet = false;
+ private boolean limitToListSet = false;
+ private boolean requestDelaySet = false;
+ private boolean ignoreDupResponsesSet = false;
+ private boolean timeoutSet = false;
+
public static final String COMPONENT_TYPE = "org.richfaces.TreeNode";
public static final String COMPONENT_FAMILY = "org.richfaces.TreeNode";
@@ -401,4 +421,424 @@
}
return tree.getOndropend();
}
+
+ /**
+ * if "true", submits ONLY one field/link, instead of all form controls
+ * Setter for ajaxSingle
+ * @param ajaxSingle - new value
+ */
+ public void setAjaxSingle( boolean __ajaxSingle ){
+ this.ajaxSingle = __ajaxSingle;
+ this.ajaxSingleSet = true;
+ }
+
+ /**
+ * if "true", submits ONLY one field/link, instead of all form controls
+ * Getter for ajaxSingle
+ * @return ajaxSingle value from local variable or value bindings
+ */
+ public boolean isAjaxSingle( ){
+ if(this.ajaxSingleSet){
+ return this.ajaxSingle;
+ }
+ ValueBinding vb = getValueBinding("ajaxSingle");
+ if (vb != null) {
+ Boolean value = (Boolean) vb.getValue(getFacesContext());
+ if (null == value) {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isAjaxSingle();
+ }
+ return this.ajaxSingle;
+ }
+ return (value.booleanValue());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isAjaxSingle();
+ }
+ return this.ajaxSingle;
+ }
+ }
+
+ /**
+ * If "true", after process validations phase it skips updates of model beans
on a force render response. It can be used for validating components input
+ * Setter for bypassUpdates
+ * @param bypassUpdates - new value
+ */
+ public void setBypassUpdates( boolean __bypassUpdates ){
+ this.bypassUpdates = __bypassUpdates;
+ this.bypassUpdatesSet = true;
+ }
+
+ /**
+ * If "true", after process validations phase it skips updates of model beans
on a force render response. It can be used for validating components input
+ * Getter for bypassUpdates
+ * @return bypassUpdates value from local variable or value bindings
+ */
+ public boolean isBypassUpdates() {
+ if (this.bypassUpdatesSet) {
+ return this.bypassUpdates;
+ }
+ ValueBinding vb = getValueBinding("bypassUpdates");
+ if (vb != null) {
+ Boolean value = (Boolean) vb.getValue(getFacesContext());
+ if (null == value) {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isBypassUpdates();
+ }
+ return this.bypassUpdates;
+ }
+ return (value.booleanValue());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isBypassUpdates();
+ }
+ return this.bypassUpdates;
+ }
+ }
+
+ /**
+ * If "true", updates on client side ONLY elements from this
'reRender' property. If "false" (default) updates all rendered by ajax
region components
+ * Setter for limitToList
+ * @param limitToList - new value
+ */
+ public void setLimitToList(boolean __limitToList) {
+ this.limitToList = __limitToList;
+ this.limitToListSet = true;
+ }
+
+ /**
+ * If "true", updates on client side ONLY elements from this
'reRender' property. If "false" (default) updates all rendered by ajax
region components
+ * Getter for limitToList
+ * @return limitToList value from local variable or value bindings
+ */
+ public boolean isLimitToList() {
+ if (this.limitToListSet) {
+ return this.limitToList;
+ }
+ ValueBinding vb = getValueBinding("limitToList");
+ if (vb != null) {
+ Boolean value = (Boolean) vb.getValue(getFacesContext());
+ if (null == value) {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isLimitToList();
+ }
+ return this.limitToList;
+ }
+ return (value.booleanValue());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isLimitToList();
+ }
+ return (this.limitToList);
+ }
+ }
+
+ /**
+ * 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
+ * Setter for reRender
+ * @param reRender - new value
+ */
+ public void setReRender(Object __reRender) {
+ this.reRender = __reRender;
+ }
+
+ /**
+ * 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
+ * Getter for reRender
+ * @return reRender value from local variable or value bindings
+ */
+ public Object getReRender() {
+ if (null != this.reRender) {
+ return this.reRender;
+ }
+ ValueBinding vb = getValueBinding("reRender");
+ if (null != vb) {
+ return (Object) vb.getValue(getFacesContext());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getReRender();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * ID (in format of call UIComponent.findComponent()) of Request status component
+ * Setter for status
+ * @param status - new value
+ */
+ public void setStatus(String __status) {
+ this.status = __status;
+ }
+
+ /**
+ * ID (in format of call UIComponent.findComponent()) of Request status component
+ * Getter for status
+ * @return status value from local variable or value bindings
+ */
+ public String getStatus() {
+ if (null != this.status) {
+ return this.status;
+ }
+ ValueBinding vb = getValueBinding("status");
+ if (null != vb) {
+ return (String) vb.getValue(getFacesContext());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getStatus();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Name of requests queue to avoid send next request before complete other from same
event. Can be used to reduce number of requests of frequently events (key press, mouse
move etc.)
+ * Setter for eventsQueue
+ * @param eventsQueue - new value
+ */
+ public void setEventsQueue(String __eventsQueue) {
+ this.eventsQueue = __eventsQueue;
+ }
+
+ /**
+ * Name of requests queue to avoid send next request before complete other from same
event. Can be used to reduce number of requests of frequently events (key press, mouse
move etc.)
+ * Getter for eventsQueue
+ * @return eventsQueue value from local variable or value bindings
+ */
+ public String getEventsQueue() {
+ if (null != this.eventsQueue) {
+ return this.eventsQueue;
+ }
+ ValueBinding vb = getValueBinding("eventsQueue");
+ if (null != vb) {
+ return (String) vb.getValue(getFacesContext());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getEventsQueue();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Attribute defines the time (in ms.) that the request will be wait in the queue before
it is ready to send.
+ When the delay time is over, the request will be sent to the server or removed if the
newest 'similar' request is in a queue already
+ * Setter for requestDelay
+ * @param requestDelay - new value
+ */
+ public void setRequestDelay(int __requestDelay) {
+ this.requestDelay = __requestDelay;
+ this.requestDelaySet = true;
+ }
+
+ /**
+ * Attribute defines the time (in ms.) that the request will be wait in the queue before
it is ready to send.
+ When the delay time is over, the request will be sent to the server or removed if the
newest 'similar' request is in a queue already
+ * Getter for requestDelay
+ * @return requestDelay value from local variable or value bindings
+ */
+ public int getRequestDelay() {
+ if (this.requestDelaySet) {
+ return this.requestDelay;
+ }
+ ValueBinding vb = getValueBinding("requestDelay");
+ if (vb != null) {
+ Integer value = (Integer) vb.getValue(getFacesContext());
+ if (null == value) {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getRequestDelay();
+ }
+ return this.requestDelay;
+ }
+ return (value.intValue());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getRequestDelay();
+ }
+ return (this.requestDelay);
+ }
+ }
+
+ /**
+ * JavaScript code for call after request completed on client side
+ * Setter for oncomplete
+ * @param oncomplete - new value
+ */
+ public void setOncomplete(String __oncomplete) {
+ this.oncomplete = __oncomplete;
+ }
+
+ /**
+ * JavaScript code for call after request completed on client side
+ * Getter for oncomplete
+ * @return oncomplete value from local variable or value bindings
+ */
+ public String getOncomplete() {
+ if (null != this.oncomplete) {
+ return this.oncomplete;
+ }
+ ValueBinding vb = getValueBinding("oncomplete");
+ if (null != vb) {
+ return (String) vb.getValue(getFacesContext());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getOncomplete();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * id of element to set focus after request completed on client side
+ * Setter for focus
+ * @param focus - new value
+ */
+ public void setFocus(String __focus) {
+ this.focus = __focus;
+ }
+
+ /**
+ * id of element to set focus after request completed on client side
+ * Getter for focus
+ * @return focus value from local variable or value bindings
+ */
+ public String getFocus() {
+ if (null != this.focus) {
+ return this.focus;
+ }
+ ValueBinding vb = getValueBinding("focus");
+ if (null != vb) {
+ return (String) vb.getValue(getFacesContext());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getFocus();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Serialized (on default with JSON) data passed on the client by a developer on AJAX
request. It's accessible via "data.foo" syntax
+ * Setter for data
+ * @param data - new value
+ */
+ public void setData(Object __data) {
+ this.data = __data;
+ }
+
+ /**
+ * Serialized (on default with JSON) data passed on the client by a developer on AJAX
request. It's accessible via "data.foo" syntax
+ * Getter for data
+ * @return data value from local variable or value bindings
+ */
+ public Object getData() {
+ if (null != this.data) {
+ return this.data;
+ }
+ ValueBinding vb = getValueBinding("data");
+ if (null != vb) {
+ return (Object) vb.getValue(getFacesContext());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getData();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Attribute allows to ignore an Ajax Response produced by a request if the newest
'similar' request is
+ in a queue already. ignoreDupResponses="true" does not cancel the request
while it is processed on the server,
+ but just allows to avoid unnecessary updates on the client side if the response
isn't actual now
+ * Setter for ignoreDupResponses
+ * @param ignoreDupResponses - new value
+ */
+ public void setIgnoreDupResponses(boolean __ignoreDupResponses) {
+ this.ignoreDupResponses = __ignoreDupResponses;
+ this.ignoreDupResponsesSet = true;
+ }
+
+ /**
+ * Attribute allows to ignore an Ajax Response produced by a request if the newest
'similar' request is
+ in a queue already. ignoreDupResponses="true" does not cancel the request
while it is processed on the server,
+ but just allows to avoid unnecessary updates on the client side if the response
isn't actual now
+ * Getter for ignoreDupResponses
+ * @return ignoreDupResponses value from local variable or value bindings
+ */
+ public boolean isIgnoreDupResponses() {
+ if (this.ignoreDupResponsesSet) {
+ return this.ignoreDupResponses;
+ }
+ ValueBinding vb = getValueBinding("ignoreDupResponses");
+ if (vb != null) {
+ Boolean value = (Boolean) vb.getValue(getFacesContext());
+ if (null == value) {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isIgnoreDupResponses();
+ }
+ return this.ignoreDupResponses;
+ }
+ return (value.booleanValue());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.isIgnoreDupResponses();
+ }
+ return (this.ignoreDupResponses);
+ }
+ }
+
+ /**
+ * Response waiting time on a particular request. If a response is not received during
this time, the request is aborted
+ * Setter for timeout
+ * @param timeout - new value
+ */
+ public void setTimeout(int __timeout) {
+ this.timeout = __timeout;
+ this.timeoutSet = true;
+ }
+
+ /**
+ * Response waiting time on a particular request. If a response is not received during
this time, the request is aborted
+ * Getter for timeout
+ * @return timeout value from local variable or value bindings
+ */
+ public int getTimeout() {
+ if (this.timeoutSet) {
+ return this.timeout;
+ }
+ ValueBinding vb = getValueBinding("timeout");
+ if (vb != null) {
+ Integer value = (Integer) vb.getValue(getFacesContext());
+ if (null == value) {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getTimeout();
+ }
+ return this.timeout;
+ }
+ return (value.intValue());
+ } else {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getTimeout();
+ }
+ return (this.timeout);
+ }
+ }
}
Show replies by date