public class AjaxBehavior extends ClientBehavior implements AjaxClientBehavior, AjaxProps
The <a4j:ajax> behavior allows Ajax capability to be added to a non-Ajax component. The non-Ajax component must implement the ClientBehaviorHolder interface for all the event attributes that support behavior rendering.
Modifier and Type | Field and Description |
---|---|
static String |
BEHAVIOR_ID |
Constructor and Description |
---|
AjaxBehavior() |
Modifier and Type | Method and Description |
---|---|
void |
addAjaxBehaviorListener(javax.faces.event.AjaxBehaviorListener listener) |
void |
broadcast(javax.faces.event.BehaviorEvent event) |
Object |
getData()
Serialized (on default with JSON) data passed to the client by a developer on an AJAX request.
|
String |
getEvent()
Name of JavaScript event property (click, change, etc.) of parent component that triggers the behavior.
|
Collection<String> |
getExecute()
Ids of components that will participate in the "execute" portion of the Request Processing Lifecycle.
|
Set<javax.faces.component.behavior.ClientBehaviorHint> |
getHints() |
javax.el.MethodExpression |
getListener()
Method expression referencing a method that will be called when an AjaxBehaviorEvent has been broadcast for the listener.
|
String |
getOnbeforedomupdate()
The client-side script method to be called after the ajax response comes back, but before the DOM is updated
|
String |
getOnbeforesubmit()
The client-side script method to be called before the AJAX request is submitted
|
String |
getOnbegin()
The client-side script method to be called before an ajax request.
|
String |
getOncomplete()
The client-side script method to be called after the DOM is updated
|
String |
getOnerror()
The client-side script method to be called when an error has occurred during Ajax communications
|
String |
getQueueId()
Identify the name of the destination queue
|
Collection<String> |
getRender()
Ids of components that will participate in the "render" portion of the Request Processing Lifecycle.
|
String |
getRendererType() |
String |
getStatus()
ID of the request status component
|
boolean |
isBypassUpdates()
If "true", after process validations phase it skips updates of model beans on a force render response.
|
boolean |
isDisabled()
If "true", do not initiate an ajax request when the associated event is observed
|
boolean |
isImmediate()
Flag indicating that, if this component is activated by the user, notifications should be delivered to interested
listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke
Application phase.
|
boolean |
isLimitRender()
If "true", render only those ids specified in the "render" attribute, forgoing the render of the auto-rendered panels
|
void |
removeAjaxBehaviorListener(javax.faces.event.AjaxBehaviorListener listener) |
void |
restoreState(javax.faces.context.FacesContext context,
Object state) |
Object |
saveState(javax.faces.context.FacesContext context) |
void |
setBypassUpdates(boolean bypassUpdates) |
void |
setData(Object data) |
void |
setDisabled(boolean disabled) |
void |
setEvent(String event) |
void |
setExecute(Collection<String> execute) |
void |
setImmediate(boolean immediate) |
void |
setLimitRender(boolean limitRender) |
void |
setListener(javax.el.MethodExpression listener) |
void |
setLiteralAttribute(String name,
Object value) |
void |
setOnbeforedomupdate(String onbeforedomupdate) |
void |
setOnbeforesubmit(String onbeforesubmit) |
void |
setOnbegin(String onbegin) |
void |
setOncomplete(String oncomplete) |
void |
setOnerror(String onerror) |
void |
setQueueId(String queueId) |
void |
setRender(Collection<String> render) |
void |
setStatus(String status) |
compare, getFacesContext, getStateHelper, getValueExpression, setLiteralValue, setValueExpression
decode, getRenderer, getScript
addBehaviorListener, clearInitialState, initialStateMarked, isTransient, markInitialState, removeBehaviorListener, setTransient
public static final String BEHAVIOR_ID
public void setLiteralAttribute(String name, Object value)
setLiteralAttribute
in class ClientBehavior
public Object getData()
getData
in interface AjaxClientBehavior
getData
in interface AjaxProps
public void setData(Object data)
setData
in interface AjaxClientBehavior
public String getEvent()
public void setEvent(String event)
public javax.el.MethodExpression getListener()
public void setListener(javax.el.MethodExpression listener)
public Collection<String> getExecute()
getExecute
in interface AjaxClientBehavior
getExecute
in interface AjaxProps
public void setExecute(Collection<String> execute)
setExecute
in interface AjaxClientBehavior
public String getOnbeforedomupdate()
getOnbeforedomupdate
in interface AjaxClientBehavior
getOnbeforedomupdate
in interface AjaxProps
public void setOnbeforedomupdate(String onbeforedomupdate)
setOnbeforedomupdate
in interface AjaxClientBehavior
public String getOnbegin()
getOnbegin
in interface AjaxClientBehavior
getOnbegin
in interface AjaxProps
public void setOnbegin(String onbegin)
setOnbegin
in interface AjaxClientBehavior
public String getOnbeforesubmit()
getOnbeforesubmit
in interface AjaxClientBehavior
public void setOnbeforesubmit(String onbeforesubmit)
setOnbeforesubmit
in interface AjaxClientBehavior
public String getOncomplete()
getOncomplete
in interface AjaxClientBehavior
getOncomplete
in interface AjaxProps
public void setOncomplete(String oncomplete)
setOncomplete
in interface AjaxClientBehavior
public String getOnerror()
getOnerror
in interface AjaxClientBehavior
public void setOnerror(String onerror)
setOnerror
in interface AjaxClientBehavior
public String getQueueId()
getQueueId
in interface AjaxClientBehavior
public void setQueueId(String queueId)
setQueueId
in interface AjaxClientBehavior
public Collection<String> getRender()
getRender
in interface AjaxClientBehavior
getRender
in interface AjaxProps
public void setRender(Collection<String> render)
setRender
in interface AjaxClientBehavior
public String getStatus()
getStatus
in interface AjaxClientBehavior
getStatus
in interface AjaxProps
public void setStatus(String status)
setStatus
in interface AjaxClientBehavior
public boolean isDisabled()
isDisabled
in interface AjaxClientBehavior
public void setDisabled(boolean disabled)
setDisabled
in interface AjaxClientBehavior
public boolean isLimitRender()
isLimitRender
in interface AjaxClientBehavior
isLimitRender
in interface AjaxProps
public void setLimitRender(boolean limitRender)
setLimitRender
in interface AjaxClientBehavior
public boolean isImmediate()
public void setImmediate(boolean immediate)
public boolean isBypassUpdates()
public void setBypassUpdates(boolean bypassUpdates)
public String getRendererType()
getRendererType
in class javax.faces.component.behavior.ClientBehaviorBase
public Set<javax.faces.component.behavior.ClientBehaviorHint> getHints()
getHints
in interface javax.faces.component.behavior.ClientBehavior
getHints
in class javax.faces.component.behavior.ClientBehaviorBase
public void addAjaxBehaviorListener(javax.faces.event.AjaxBehaviorListener listener)
addAjaxBehaviorListener
in interface AjaxClientBehavior
public void removeAjaxBehaviorListener(javax.faces.event.AjaxBehaviorListener listener)
removeAjaxBehaviorListener
in interface AjaxClientBehavior
public void broadcast(javax.faces.event.BehaviorEvent event) throws javax.faces.event.AbortProcessingException
broadcast
in interface javax.faces.component.behavior.Behavior
broadcast
in class javax.faces.component.behavior.BehaviorBase
javax.faces.event.AbortProcessingException
public void restoreState(javax.faces.context.FacesContext context, Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class ClientBehavior
public Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class ClientBehavior
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.