Summary
Tag name:
<tr:poll>
UIComponent class:
org.apache.myfaces.trinidad.component.core.CorePoll
Component type:
org.apache.myfaces.trinidad.CorePoll
The poll element triggers an event after the time interval
specified by the interval attribute (in milliseconds).
On the server, the org.apache.myfaces.trinidad.event.PollEvent
is queued and the listeners get a chance to update the model,
refresh components, or even display a dialog in response to
this event. The components that have listed this poll
component as a partiaTrigger get a chance to re-render themselves.
The poll component automatically uses Partial Page Rendering
(PPR) if available.
Events
Type | Phases | Description |
---|---|---|
org.apache.myfaces.trinidad.event.PollEvent | Apply Request Values, Invoke Application |
Event delivered when the poll component polls the server. |
org.apache.myfaces.trinidad.event.AttributeChangeEvent | Invoke Application, Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
Attributes
Name | Type | Supports EL? | Description |
---|---|---|---|
attributeChangeListener | javax.el.MethodExpression | Only EL | a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
binding | org.apache.myfaces.trinidad.component. |
Only EL | an EL reference that will store the component instance on a bean. This can be used to give programmatic access to a component from a backing bean, or to move creation of the component to a backing bean. |
id | String | No | the identifier for the component. The identifier
must follow a subset of the syntax allowed in HTML:
|
immediate | boolean | Yes | whether data validation should be skipped when poll events are generated by this component. When immediate is false (the default), events will be delivered during the Invoke Application phase, which will trigger validation. When set to true, events will be executed during the Apply Request Values phase. |
interval | int | Yes | the time between poll events, in milliseconds. The default is 5000. If in screen-reader mode, make sure the interval is long enough for the screen reader to read through the re-render before a new poll occurs. |
pollListener | javax.el.MethodExpression | Only EL | a method reference to a poll listener |
rendered | boolean | Yes | whether the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible on the client). |