Author: nbelaevski
Date: 2009-08-26 08:41:39 -0400 (Wed, 26 Aug 2009)
New Revision: 15310
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-7759
HtmlAjaxFunction updated to comply with JSF 2.0 standards
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java 2009-08-26
12:29:52 UTC (rev 15309)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java 2009-08-26
12:41:39 UTC (rev 15310)
@@ -22,13 +22,10 @@
package org.richfaces.component;
import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
import javax.el.MethodExpression;
import javax.faces.component.NamingContainer;
import javax.faces.component.UICommand;
-import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
import javax.faces.event.BehaviorEvent;
import javax.faces.event.FacesEvent;
@@ -39,16 +36,12 @@
* @author shura
*
*/
-public class UIPush extends UICommand implements ClientBehaviorHolder {
+public class UIPush extends UICommand {
public static final String COMPONENT_TYPE = "org.richfaces.Push";
public final static String COMPONENT_FAMILY = "org.richfaces.Push";
- public static final String ON_DATA_AVAILABLE = "ondataavailable";
-
- private static final Collection<String> EVENT_NAMES =
Collections.singleton(ON_DATA_AVAILABLE);
-
private transient boolean hasActiveBehavior = false;
private static enum PropertyKeys {
@@ -114,16 +107,6 @@
}
@Override
- public String getDefaultEventName() {
- return ON_DATA_AVAILABLE;
- }
-
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
- @Override
public String getFamily() {
return COMPONENT_FAMILY;
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java 2009-08-26
12:29:52 UTC (rev 15309)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java 2009-08-26
12:41:39 UTC (rev 15310)
@@ -5,12 +5,8 @@
import java.util.Collections;
import java.util.LinkedHashSet;
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
import javax.faces.component.UICommand;
import javax.faces.component.behavior.ClientBehaviorHolder;
-import javax.faces.context.FacesContext;
public class HtmlAjaxFunction extends UICommand implements ClientBehaviorHolder {
@@ -22,643 +18,81 @@
new LinkedHashSet<String>(Arrays.asList("begin", "complete",
"beforedomupdate"))
);
+ private static enum PropertyKeys {
+ limitRender, name, onbeforedomupdate, onbegin, oncomplete, execute, render, status
+ }
+
public HtmlAjaxFunction() {
setRendererType("org.richfaces.FunctionRenderer");
}
- /*
- * Limits JSF tree processing (decoding, conversion, validation and model updating) only
to a component that sends the request. Boolean
- */
- private boolean _ajaxSingle = false;
-
- private boolean _ajaxSingleSet = false;
-
- /*
- * 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
- */
- private boolean _bypassUpdates = false;
-
- private boolean _bypassUpdatesSet = false;
-
- /*
- * Serialized (on default with JSON) data passed on the client by a developer on AJAX
request. It's accessible via "data.foo" syntax
- */
- private Object _data = 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.)
- */
- private String _eventsQueue = null;
-
- /*
- * ID of an element to set focus after request is completed on client side
- */
- private String _focus = 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
- */
- private boolean _ignoreDupResponses = false;
-
- private boolean _ignoreDupResponsesSet = false;
-
- /*
- * If "true", then of all AJAX-rendered on the page components only those will
be updated,
- which ID's are passed to the "reRender" attribute of the describable
component.
- "false"-the default value-means that all components with
ajaxRendered="true" will be updated.
- */
- private boolean _limitRender = false;
-
- private boolean _limitRenderSet = false;
-
- /*
- * Name of generated JavaScript function definition
- */
- private String _name = null;
-
- /*
- * The client-side script method to be called before DOM is updated
- */
- private String _onbeforedomupdate = null;
-
- private String _onbegin = null;
+ public boolean isLimitRender() {
+ return Boolean.parseBoolean(getStateHelper().eval(PropertyKeys.limitRender,
+ Boolean.FALSE).toString());
+ }
- /*
- * The client-side script method to be called after the request is completed
- */
- private String _oncomplete = null;
-
- /*
- * Id['s] (in format of call UIComponent.findComponent()) of components, processed
at the phases 2-5 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
- */
- private Object _process = null;
-
- /*
- * 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
- */
- private Object _reRender = 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
- */
- private int _requestDelay = Integer.MIN_VALUE;
-
- private boolean _requestDelaySet = false;
-
- /*
- * If there are any component requests with identical IDs then these requests will be
grouped.
- */
- private String _similarityGroupingId = null;
-
- /*
- * ID (in format of call UIComponent.findComponent()) of Request status component
- */
- private String _status = null;
-
- /*
- * Response waiting time on a particular request. If a response is not received during
this time, the request is aborted
- */
- private int _timeout = Integer.MIN_VALUE;
-
- private boolean _timeoutSet = false;
-
- public boolean isAjaxSingle(){
- if (this._ajaxSingleSet) {
- return (this._ajaxSingle);
- }
- ValueExpression ve = getValueExpression("ajaxSingle");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._ajaxSingle);
- }
-
- return value;
- } else {
- return (this._ajaxSingle);
- }
-
+ public void setLimitRender(boolean limitRenderValue) {
+ getStateHelper().put(PropertyKeys.limitRender, limitRenderValue);
}
-
- public void setAjaxSingle(boolean _ajaxSingle){
- this._ajaxSingle = _ajaxSingle;
- this._ajaxSingleSet = true;
+
+ public String getName() {
+ //TODO required attribute
+ return (String) getStateHelper().eval(PropertyKeys.name);
}
-
- public boolean isBypassUpdates(){
- if (this._bypassUpdatesSet) {
- return (this._bypassUpdates);
- }
- ValueExpression ve = getValueExpression("bypassUpdates");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._bypassUpdates);
- }
-
- return value;
- } else {
- return (this._bypassUpdates);
- }
-
+
+ public void setName(String name) {
+ getStateHelper().put(PropertyKeys.name, name);
}
-
- public void setBypassUpdates(boolean _bypassUpdates){
- this._bypassUpdates = _bypassUpdates;
- this._bypassUpdatesSet = true;
+
+ public String getOnbegin() {
+ return (String) getStateHelper().eval(PropertyKeys.onbegin);
}
-
- public Object getData(){
- if (this._data != null) {
- return this._data;
- }
- ValueExpression ve = getValueExpression("data");
- if (ve != null) {
- Object value = null;
-
- try {
- value = (Object) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+
+ public void setOnbegin(String onbegin) {
+ getStateHelper().put(PropertyKeys.onbegin, onbegin);
}
-
- public void setData(Object _data){
- this._data = _data;
+
+ public String getOnbeforedomupdate() {
+ return (String) getStateHelper().eval(PropertyKeys.onbeforedomupdate);
}
- public String getEventsQueue(){
- if (this._eventsQueue != null) {
- return this._eventsQueue;
- }
- ValueExpression ve = getValueExpression("eventsQueue");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+ public void setOnbeforedomupdate(String onbeforedomupdate) {
+ getStateHelper().put(PropertyKeys.onbeforedomupdate, onbeforedomupdate);
}
- public void setEventsQueue(String _eventsQueue){
- this._eventsQueue = _eventsQueue;
+ public String getOncomplete() {
+ return (String) getStateHelper().eval(PropertyKeys.oncomplete);
}
- public String getFocus(){
- if (this._focus != null) {
- return this._focus;
- }
- ValueExpression ve = getValueExpression("focus");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+ public void setOncomplete(String oncomplete) {
+ getStateHelper().put(PropertyKeys.oncomplete, oncomplete);
}
- public void setFocus(String _focus){
- this._focus = _focus;
+ public Object getExecute() {
+ return getStateHelper().eval(PropertyKeys.execute);
}
-
- public boolean isIgnoreDupResponses(){
- if (this._ignoreDupResponsesSet) {
- return (this._ignoreDupResponses);
- }
- ValueExpression ve = getValueExpression("ignoreDupResponses");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._ignoreDupResponses);
- }
-
- return value;
- } else {
- return (this._ignoreDupResponses);
- }
-
+
+ public void setExecute(Object execute) {
+ getStateHelper().put(PropertyKeys.execute, execute);
}
-
- public void setIgnoreDupResponses(boolean _ignoreDupResponses){
- this._ignoreDupResponses = _ignoreDupResponses;
- this._ignoreDupResponsesSet = true;
+
+ public Object getRender() {
+ return getStateHelper().eval(PropertyKeys.render);
}
- public boolean isLimitRender(){
- if (this._limitRenderSet) {
- return (this._limitRender);
- }
- ValueExpression ve = getValueExpression("limitRender");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._limitRender);
- }
-
- return value;
- } else {
- return (this._limitRender);
- }
-
+ public void setRender(Object render) {
+ getStateHelper().put(PropertyKeys.render, render);
}
-
- public void setLimitRender(boolean _limitRender){
- this._limitRender = _limitRender;
- this._limitRenderSet = true;
+
+ public String getStatus() {
+ return (String) getStateHelper().eval(PropertyKeys.status);
}
- public String getName(){
- if (this._name != null) {
- return this._name;
- }
- ValueExpression ve = getValueExpression("name");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+ public void setStatus(String status) {
+ getStateHelper().put(PropertyKeys.status, status);
}
-
- public void setName(String _name){
- this._name = _name;
- }
-
- public String getOnbeforedomupdate(){
- if (this._onbeforedomupdate != null) {
- return this._onbeforedomupdate;
- }
- ValueExpression ve = getValueExpression("onbeforedomupdate");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setOnbeforedomupdate(String _onbeforedomupdate){
- this._onbeforedomupdate = _onbeforedomupdate;
- }
-
- public String getOncomplete(){
- if (this._oncomplete != null) {
- return this._oncomplete;
- }
- ValueExpression ve = getValueExpression("oncomplete");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setOncomplete(String _oncomplete){
- this._oncomplete = _oncomplete;
- }
-
- public Object getProcess(){
- if (this._process != null) {
- return this._process;
- }
- ValueExpression ve = getValueExpression("process");
- if (ve != null) {
- Object value = null;
-
- try {
- value = (Object) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setProcess(Object _process){
- this._process = _process;
- }
-
- public Object getReRender(){
- if (this._reRender != null) {
- return this._reRender;
- }
- ValueExpression ve = getValueExpression("reRender");
- if (ve != null) {
- Object value = null;
-
- try {
- value = (Object) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setReRender(Object _reRender){
- this._reRender = _reRender;
- }
-
- public int getRequestDelay(){
- if (this._requestDelaySet) {
- return (this._requestDelay);
- }
- ValueExpression ve = getValueExpression("requestDelay");
- if (ve != null) {
- Integer value = null;
-
- try {
- value = (Integer) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._requestDelay);
- }
-
- return value;
- } else {
- return (this._requestDelay);
- }
-
- }
-
- public void setRequestDelay(int _requestDelay){
- this._requestDelay = _requestDelay;
- this._requestDelaySet = true;
- }
-
- public String getSimilarityGroupingId(){
- if (this._similarityGroupingId != null) {
- return this._similarityGroupingId;
- }
- ValueExpression ve = getValueExpression("similarityGroupingId");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setSimilarityGroupingId(String _similarityGroupingId){
- this._similarityGroupingId = _similarityGroupingId;
- }
-
- public String getStatus(){
- if (this._status != null) {
- return this._status;
- }
- ValueExpression ve = getValueExpression("status");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setStatus(String _status){
- this._status = _status;
- }
-
- public int getTimeout(){
- if (this._timeoutSet) {
- return (this._timeout);
- }
- ValueExpression ve = getValueExpression("timeout");
- if (ve != null) {
- Integer value = null;
-
- try {
- value = (Integer) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._timeout);
- }
-
- return value;
- } else {
- return (this._timeout);
- }
-
- }
-
- public void setTimeout(int _timeout){
- this._timeout = _timeout;
- this._timeoutSet = true;
- }
-
- /**
- * @return the _onbegin
- */
- public String getOnbegin() {
- if (this._onbegin != null) {
- return this._onbegin;
- }
- ValueExpression ve = getValueExpression("onbegin");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
- }
-
- /**
- * @param onbegin the _onbegin to set
- */
- public void setOnbegin(String onbegin) {
- _onbegin = onbegin;
- }
- public String getFamily(){
- return COMPONENT_FAMILY;
- }
-
@Override
- public Object saveState(FacesContext context){
- Object [] state = new Object[24];
- state[0] = super.saveState(context);
- state[1] = Boolean.valueOf(_ajaxSingle);
- state[2] = Boolean.valueOf(_ajaxSingleSet);
- state[3] = Boolean.valueOf(_bypassUpdates);
- state[4] = Boolean.valueOf(_bypassUpdatesSet);
- state[5] = saveAttachedState(context, _data);
- state[6] = _eventsQueue;
- state[7] = _focus;
- state[8] = Boolean.valueOf(_ignoreDupResponses);
- state[9] = Boolean.valueOf(_ignoreDupResponsesSet);
- state[10] = Boolean.valueOf(_limitRender);
- state[11] = Boolean.valueOf(_limitRenderSet);
- state[12] = _name;
- state[13] = _onbeforedomupdate;
- state[14] = _oncomplete;
- state[15] = saveAttachedState(context, _process);
- state[16] = saveAttachedState(context, _reRender);
- state[17] = Integer.valueOf(_requestDelay);
- state[18] = Boolean.valueOf(_requestDelaySet);
- state[19] = _similarityGroupingId;
- state[20] = _status;
- state[21] = Integer.valueOf(_timeout);
- state[22] = Boolean.valueOf(_timeoutSet);
- state[23] = _onbegin;
- return state;
- }
-
- @Override
- public void restoreState(FacesContext context, Object state){
- Object[] states = (Object[]) state;
- super.restoreState(context, states[0]);
- _ajaxSingle = ((Boolean)states[1]).booleanValue();
- _ajaxSingleSet = ((Boolean)states[2]).booleanValue();
- _bypassUpdates = ((Boolean)states[3]).booleanValue();
- _bypassUpdatesSet = ((Boolean)states[4]).booleanValue();
- _data = (Object)restoreAttachedState(context, states[5]);
- _eventsQueue = (String)states[6];;
- _focus = (String)states[7];;
- _ignoreDupResponses = ((Boolean)states[8]).booleanValue();
- _ignoreDupResponsesSet = ((Boolean)states[9]).booleanValue();
- _limitRender = ((Boolean)states[10]).booleanValue();
- _limitRenderSet = ((Boolean)states[11]).booleanValue();
- _name = (String)states[12];;
- _onbeforedomupdate = (String)states[13];;
- _oncomplete = (String)states[14];;
- _process = (Object)restoreAttachedState(context, states[15]);
- _reRender = (Object)restoreAttachedState(context, states[16]);
- _requestDelay = ((Integer)states[17]).intValue();
- _requestDelaySet = ((Boolean)states[18]).booleanValue();
- _similarityGroupingId = (String)states[19];;
- _status = (String)states[20];;
- _timeout = ((Integer)states[21]).intValue();
- _timeoutSet = ((Boolean)states[22]).booleanValue();
- _onbegin = (String) states[23];
- }
-
- @Override
public Collection<String> getEventNames() {
return EVENT_NAMES;
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java 2009-08-26
12:29:52 UTC (rev 15309)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java 2009-08-26
12:41:39 UTC (rev 15310)
@@ -56,7 +56,7 @@
getStateHelper().put(PropertyKeys.styleClass, styleClass);
}
- public boolean getLimitRender() {
+ public boolean isLimitRender() {
return Boolean.valueOf(getStateHelper().eval(PropertyKeys.limitRender,
Boolean.FALSE).toString());
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java 2009-08-26
12:29:52 UTC (rev 15309)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java 2009-08-26
12:41:39 UTC (rev 15310)
@@ -57,7 +57,7 @@
getStateHelper().put(PropertyKeys.styleClass, styleClass);
}
- public boolean getLimitRender() {
+ public boolean isLimitRender() {
return Boolean.valueOf(getStateHelper().eval(PropertyKeys.limitRender,
Boolean.FALSE).toString());
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java 2009-08-26
12:29:52 UTC (rev 15309)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java 2009-08-26
12:41:39 UTC (rev 15310)
@@ -26,14 +26,29 @@
*
*/
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
import org.richfaces.component.UIPush;
-public class HtmlPush extends UIPush {
+public class HtmlPush extends UIPush implements ClientBehaviorHolder {
public final static String COMPONENT_FAMILY = "org.richfaces.Push";
public final static String COMPONENT_TYPE = "org.richfaces.Push";
+ public static final String ON_DATA_AVAILABLE = "ondataavailable";
+
+ public static final String DATA_AVAILABLE = "dataAvailable";
+
+ private static final Collection<String> EVENT_NAMES =
Collections.singleton(DATA_AVAILABLE);
+
+ private static enum PropertyKeys {
+ ondataavailable
+ }
+
public HtmlPush(){
setRendererType("org.richfaces.PushRenderer");
}
@@ -42,4 +57,21 @@
return COMPONENT_FAMILY;
}
+ @Override
+ public String getDefaultEventName() {
+ return DATA_AVAILABLE;
+ }
+
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
+ }
+
+ public String getOndataavailable() {
+ return (String) getStateHelper().eval(PropertyKeys.ondataavailable);
+ }
+
+ public void setOndataavailable(String ondataavailable) {
+ getStateHelper().put(PropertyKeys.ondataavailable, ondataavailable);
+ }
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java 2009-08-26
12:29:52 UTC (rev 15309)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java 2009-08-26
12:41:39 UTC (rev 15310)
@@ -39,6 +39,7 @@
import org.ajax4jsf.renderkit.RendererBase;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.UIPush;
+import org.richfaces.component.html.HtmlPush;
/**
* @author shura
@@ -98,13 +99,13 @@
options.put("pushId", push.getListenerId(context));
options.put("clientId", component.getClientId(context));
- String behaviorsChain = AjaxRendererUtils.createBehaviorsChain(context, push,
UIPush.ON_DATA_AVAILABLE,
- UIPush.ON_DATA_AVAILABLE, true);
+ String behaviorsChain = AjaxRendererUtils.createBehaviorsChain(context, push,
HtmlPush.ON_DATA_AVAILABLE,
+ HtmlPush.DATA_AVAILABLE, true);
if (behaviorsChain != null) {
JSFunctionDefinition dataAvailableHandler = new
JSFunctionDefinition(JSReference.EVENT);
dataAvailableHandler.addToBody(behaviorsChain);
- options.put(UIPush.ON_DATA_AVAILABLE, dataAvailableHandler);
+ options.put(HtmlPush.ON_DATA_AVAILABLE, dataAvailableHandler);
}
function.addParameter(options);
script.append(function.toScript());