|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UICommand
org.ajax4jsf.component.AjaxActionComponent
org.ajax4jsf.component.UIAjaxSupport
org.ajax4jsf.component.html.HtmlAjaxSupport
public class HtmlAjaxSupport
Component-Type org.ajax4jsf.Support Component-Family org.ajax4jsf.AjaxSupport Renderer-Type org.ajax4jsf.components.AjaxSupportRenderer Adds the AJAX functionality for those UIComponent-based componenent that have properties for JavaScript events. During Decoding: If a request is Ajax-performed, obtains the Map from the "requestParameterMap" property of the ExternalContext. If this Map contains non null value for the "clientId" key, creates a javax.faces.event.ActionEvent around the component, passes it to the queueEvent() method of the component, and then appends it's reRender components IDs to a list of rendered areas. During Encoding. Doesn't encode as a component. Instead, it adds ValueBinding for a property of the parent component with the name as a value of its "event" property. As a result, when rendered, the parent component builds JavaScript code for submitting an AJAX request on this event. If the component has child UIParameter components, appends it's name/value as additional request parameters. If a parent component is an instance of UIInput and the ajaxType property is "input", submits the value of the input field, also. In this case, you can submit a single input field outside of UIForm.
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_FAMILY
|
static java.lang.String |
COMPONENT_TYPE
|
Fields inherited from class org.ajax4jsf.component.UIAjaxSupport |
---|
AJAX_SUPPORT_SET, DEFAULT_RENDERER_TYPE |
Fields inherited from class org.ajax4jsf.component.AjaxActionComponent |
---|
FOCUS_DATA_ID |
Fields inherited from interface org.ajax4jsf.component.AjaxComponent |
---|
AJAX_COMPONETT_PARAMETER |
Constructor Summary | |
---|---|
HtmlAjaxSupport()
Constructor to init default renderers |
Method Summary | |
---|---|
java.lang.Object |
getData()
Serialized (on default with JSON) data passed on the client by a developer on AJAX request. |
java.lang.String |
getEvent()
Name of JavaScript event property ( onclick, onchange, etc.) of parent component, for which we will build AJAX submission code Getter for event |
java.lang.String |
getEventsQueue()
Name of requests queue to avoid send next request before complete other from same event. |
java.lang.String |
getFamily()
|
java.lang.String |
getFocus()
id of element to set focus after request completed on client side Getter for focus |
java.lang.String |
getOnbeforedomupdate()
JavaScript code for call before DOM has been updated on client side Getter for onbeforedomupdate |
java.lang.String |
getOncomplete()
JavaScript code for call after request completed on client side Getter for oncomplete |
java.lang.String |
getOnsubmit()
JavaScript code for call before submission of ajax event Getter for onsubmit |
int |
getRequestDelay()
Attribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send. |
java.lang.Object |
getReRender()
Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. |
java.lang.String |
getStatus()
ID (in format of call UIComponent.findComponent()) of Request status component Getter for status |
int |
getTimeout()
Timeout (in ms) for request Getter for timeout |
boolean |
isAjaxSingle()
if "true", submits ONLY one field/link, instead of all form controls Getter for ajaxSingle |
boolean |
isBypassUpdates()
If "true", after process validations phase it skips updates of model beans on a force render response. |
boolean |
isDisableDefault()
Disable default action for target event ( append "return false;" to javascript ) Getter for disableDefault |
boolean |
isIgnoreDupResponses()
Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is in a queue already. |
boolean |
isLimitToList()
If "true", updates on client side ONLY elements from this 'reRender' property. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setAjaxSingle(boolean __ajaxSingle)
if "true", submits ONLY one field/link, instead of all form controls Setter for ajaxSingle |
void |
setBypassUpdates(boolean __bypassUpdates)
If "true", after process validations phase it skips updates of model beans on a force render response. |
void |
setData(java.lang.Object __data)
Serialized (on default with JSON) data passed on the client by a developer on AJAX request. |
void |
setDisableDefault(boolean __disableDefault)
Disable default action for target event ( append "return false;" to javascript ) Setter for disableDefault |
void |
setEvent(java.lang.String __event)
Name of JavaScript event property ( onclick, onchange, etc.) of parent component, for which we will build AJAX submission code Setter for event |
void |
setEventsQueue(java.lang.String __eventsQueue)
Name of requests queue to avoid send next request before complete other from same event. |
void |
setFocus(java.lang.String __focus)
id of element to set focus after request completed on client side Setter for focus |
void |
setIgnoreDupResponses(boolean __ignoreDupResponses)
Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is in a queue already. |
void |
setLimitToList(boolean __limitToList)
If "true", updates on client side ONLY elements from this 'reRender' property. |
void |
setOnbeforedomupdate(java.lang.String __onbeforedomupdate)
JavaScript code for call before DOM has been updated on client side Setter for onbeforedomupdate |
void |
setOncomplete(java.lang.String __oncomplete)
JavaScript code for call after request completed on client side Setter for oncomplete |
void |
setOnsubmit(java.lang.String __onsubmit)
JavaScript code for call before submission of ajax event Setter for onsubmit |
void |
setRequestDelay(int __requestDelay)
Attribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send. |
void |
setReRender(java.lang.Object __reRender)
Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. |
void |
setStatus(java.lang.String __status)
ID (in format of call UIComponent.findComponent()) of Request status component Setter for status |
void |
setTimeout(int __timeout)
Timeout (in ms) for request Setter for timeout |
Methods inherited from class org.ajax4jsf.component.UIAjaxSupport |
---|
decode, getEventString, getSingleComponent, setParent, setParentProperties, setValueBinding |
Methods inherited from class org.ajax4jsf.component.AjaxActionComponent |
---|
addAjaxListener, broadcast, getAjaxListeners, queueEvent, removeAjaxListener, setupReRender, setupReRender |
Methods inherited from class javax.faces.component.UICommand |
---|
addActionListener, getAction, getActionListener, getActionListeners, getValue, isImmediate, removeActionListener, setAction, setActionListener, setImmediate, setValue |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setRendered, setRendererType, setTransient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String COMPONENT_FAMILY
Constructor Detail |
---|
public HtmlAjaxSupport()
Method Detail |
---|
public void setOncomplete(java.lang.String __oncomplete)
oncomplete
- - new valuepublic java.lang.String getOncomplete()
public void setReRender(java.lang.Object __reRender)
reRender
- - new valuepublic java.lang.Object getReRender()
public void setFocus(java.lang.String __focus)
focus
- - new valuepublic java.lang.String getFocus()
public void setDisableDefault(boolean __disableDefault)
disableDefault
- - new valuepublic boolean isDisableDefault()
public void setBypassUpdates(boolean __bypassUpdates)
bypassUpdates
- - new valuepublic boolean isBypassUpdates()
public void setLimitToList(boolean __limitToList)
limitToList
- - new valuepublic boolean isLimitToList()
public void setAjaxSingle(boolean __ajaxSingle)
ajaxSingle
- - new valuepublic boolean isAjaxSingle()
public void setOnsubmit(java.lang.String __onsubmit)
setOnsubmit
in class UIAjaxSupport
onsubmit
- - new valuepublic java.lang.String getOnsubmit()
getOnsubmit
in class UIAjaxSupport
public void setTimeout(int __timeout)
timeout
- - new valuepublic int getTimeout()
public void setStatus(java.lang.String __status)
status
- - new valuepublic java.lang.String getStatus()
public void setRequestDelay(int __requestDelay)
requestDelay
- - new valuepublic int getRequestDelay()
public void setEventsQueue(java.lang.String __eventsQueue)
eventsQueue
- - new valuepublic java.lang.String getEventsQueue()
public void setData(java.lang.Object __data)
data
- - new valuepublic java.lang.Object getData()
public void setEvent(java.lang.String __event)
event
- - new valuepublic java.lang.String getEvent()
public void setOnbeforedomupdate(java.lang.String __onbeforedomupdate)
onbeforedomupdate
- - new valuepublic java.lang.String getOnbeforedomupdate()
public void setIgnoreDupResponses(boolean __ignoreDupResponses)
ignoreDupResponses
- - new valuepublic boolean isIgnoreDupResponses()
public java.lang.String getFamily()
getFamily
in class javax.faces.component.UICommand
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UICommand
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UICommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |