Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces UI Components UI 4.2.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ajax4jsf.component.behavior
Class AjaxBehavior

    java.lang.Object
      javax.faces.component.behavior.BehaviorBase
          javax.faces.component.behavior.ClientBehaviorBase
              org.richfaces.component.behavior.ClientBehavior
                  org.ajax4jsf.component.behavior.AjaxBehavior

All Implemented Interfaces:
  javax.faces.component.behavior.Behavior, javax.faces.component.behavior.ClientBehavior, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, org.ajax4jsf.component.AjaxClientBehavior

Direct Known Subclasses:
  ClientValidatorImpl

    public class AjaxBehavior

extends ClientBehavior
implements org.ajax4jsf.component.AjaxClientBehavior

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.

Author:
  Anton Belevich

Field Summary
`static String` | `BEHAVIOR_ID`

Constructor Summary
`AjaxBehavior()`

Method Summary
`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.
`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()`
`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` | `setExecute(Collection<String> execute)`
`void` | `setImmediate(boolean immediate)`
`void` | `setLimitRender(boolean limitRender)`
`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)`

Methods inherited from class org.richfaces.component.behavior.ClientBehavior
`compare, getFacesContext, getStateHelper, getValueExpression, setLiteralValue, setValueExpression`

Methods inherited from class javax.faces.component.behavior.ClientBehaviorBase
`decode, getRenderer, getScript`

Methods inherited from class javax.faces.component.behavior.BehaviorBase
`addBehaviorListener, clearInitialState, initialStateMarked, isTransient, markInitialState, removeBehaviorListener, setTransient`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.faces.component.behavior.ClientBehavior
`decode, getScript`

Field Detail

### BEHAVIOR_ID

    public static final String BEHAVIOR_ID

See Also:
  Constant Field Values

Constructor Detail

### AjaxBehavior

    public AjaxBehavior()

Method Detail

### setLiteralAttribute

    public void setLiteralAttribute(String name,
                                    Object value)

  Specified by:
    `setLiteralAttribute` in class `ClientBehavior`

### getData

    public Object getData()

  Serialized (on default with JSON) data passed to the client by a developer on an AJAX request. It's accessible via "event.data" syntax. Both primitive types and complex types such as arrays and collections can be serialized and used with data

  Specified by:
    `getData` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setData

    public void setData(Object data)

  Specified by:
    `setData` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getExecute

    public Collection<String> getExecute()

  Ids of components that will participate in the "execute" portion of the Request Processing Lifecycle. Can be a single id, a space or comma separated list of Id's, or an EL Expression evaluating to an array or Collection. Any of the keywords "@this", "@form", "@all", "@none", "@region" may be specified in the identifier list. Some components make use of additional keywords

  Specified by:
    `getExecute` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setExecute

    public void setExecute(Collection<String> execute)

  Specified by:
    `setExecute` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getOnbeforedomupdate

    public String getOnbeforedomupdate()

  The client-side script method to be called after the ajax response comes back, but before the DOM is updated

  Specified by:
    `getOnbeforedomupdate` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setOnbeforedomupdate

    public void setOnbeforedomupdate(String onbeforedomupdate)

  Specified by:
    `setOnbeforedomupdate` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getOnbegin

    public String getOnbegin()

  The client-side script method to be called before an ajax request.

  Specified by:
    `getOnbegin` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setOnbegin

    public void setOnbegin(String onbegin)

  Specified by:
    `setOnbegin` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getOnbeforesubmit

    public String getOnbeforesubmit()

  The client-side script method to be called before the AJAX request is submitted

  Specified by:
    `getOnbeforesubmit` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setOnbeforesubmit

    public void setOnbeforesubmit(String onbeforesubmit)

  Specified by:
    `setOnbeforesubmit` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getOncomplete

    public String getOncomplete()

  The client-side script method to be called after the DOM is updated

  Specified by:
    `getOncomplete` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setOncomplete

    public void setOncomplete(String oncomplete)

  Specified by:
    `setOncomplete` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getOnerror

    public String getOnerror()

  The client-side script method to be called when an error has occurred during Ajax communications

  Specified by:
    `getOnerror` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setOnerror

    public void setOnerror(String onerror)

  Specified by:
    `setOnerror` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getQueueId

    public String getQueueId()

  Identify the name of the destination queue

  Specified by:
    `getQueueId` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setQueueId

    public void setQueueId(String queueId)

  Specified by:
    `setQueueId` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getRender

    public Collection<String> getRender()

  Ids of components that will participate in the "render" portion of the Request Processing Lifecycle. Can be a single id, a space or comma separated list of Id's, or an EL Expression evaluating to an array or Collection. Any of the keywords "@this", "@form", "@all", "@none", "@region" may be specified in the identifier list. Some components make use of additional keywords

  Specified by:
    `getRender` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setRender

    public void setRender(Collection<String> render)

  Specified by:
    `setRender` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### getStatus

    public String getStatus()

  ID of the request status component

  Specified by:
    `getStatus` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setStatus

    public void setStatus(String status)

  Specified by:
    `setStatus` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### isDisabled

    public boolean isDisabled()

  If "true", do not initiate an ajax request when the associated event is observed

  Specified by:
    `isDisabled` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setDisabled

    public void setDisabled(boolean disabled)

  Specified by:
    `setDisabled` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### isLimitRender

    public boolean isLimitRender()

  If "true", render only those ids specified in the "render" attribute, forgoing the render of the auto-rendered panels

  Specified by:
    `isLimitRender` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### setLimitRender

    public void setLimitRender(boolean limitRender)

  Specified by:
    `setLimitRender` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### isImmediate

    public 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.

### setImmediate

    public void setImmediate(boolean immediate)

### isBypassUpdates

    public boolean isBypassUpdates()

  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

### setBypassUpdates

    public void setBypassUpdates(boolean bypassUpdates)

### getRendererType

    public String getRendererType()

  Overrides:
    `getRendererType` in class `javax.faces.component.behavior.ClientBehaviorBase`

### getHints

    public Set<javax.faces.component.behavior.ClientBehaviorHint> getHints()

  Specified by:
    `getHints` in interface `javax.faces.component.behavior.ClientBehavior`
  Overrides:
    `getHints` in class `javax.faces.component.behavior.ClientBehaviorBase`

### addAjaxBehaviorListener

    public void addAjaxBehaviorListener(javax.faces.event.AjaxBehaviorListener listener)

  Specified by:
    `addAjaxBehaviorListener` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### removeAjaxBehaviorListener

    public void removeAjaxBehaviorListener(javax.faces.event.AjaxBehaviorListener listener)

  Specified by:
    `removeAjaxBehaviorListener` in interface `org.ajax4jsf.component.AjaxClientBehavior`

### broadcast

    public void broadcast(javax.faces.event.BehaviorEvent event)
                   throws javax.faces.event.AbortProcessingException

  Specified by:
    `broadcast` in interface `javax.faces.component.behavior.Behavior`
  Overrides:
    `broadcast` in class `javax.faces.component.behavior.BehaviorBase`
  Throws:
    `javax.faces.event.AbortProcessingException`

### restoreState

    public void restoreState(javax.faces.context.FacesContext context,
                             Object state)

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `restoreState` in class `ClientBehavior`

### saveState

    public Object saveState(javax.faces.context.FacesContext context)

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `saveState` in class `ClientBehavior`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces UI Components UI 4.2.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.