Summary

Tag Name:<af:poll>
Java Class:oracle.adf.view.rich.component.rich.RichPoll
Component Type:oracle.adf.RichPoll

The poll component delivers PollEvents to the server at fixed intervals. This can be used either for steady updates, or to deliver a heartbeat to keep a user logged in, or to warn a user about to be logged out (for some examples).

Note: Any poll event that got queued before polling is disabled (e.g. using setInterval(-1)) will not be thrown away and will be treated as valid event according to the behavior of polling.

Supported Client Events for Client Behaviors

  • poll (default)
  • propertyChange

Events

Type Phases Description
org.apache.myfaces.trinidad.event.PollEventApply Request Values,
Invoke Application
Event delivered when the poll component polls the server.
org.apache.myfaces.trinidad.event.AttributeChangeEventInvoke 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 event might include the width of a column that supported client-side resizing.

Attributes

Name Type Supports EL? Description
attributeChangeListenerjavax.el.MethodExpressionOnly 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.
bindingoracle.adf.view.rich.component.rich.RichPollOnly 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.
clientComponentbooleanYes Default Value: false

whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.
customizationIdStringYes This attribute is deprecated. This attribute will be removed in the next release. Use the 'id' attribute instead.

This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release.
idStringNo the identifier for the component. Every component may be named by a component identifier that must conform to the following rules:
  • They must start with a letter (as defined by the Character.isLetter() method) or underscore ( _ ).
  • Subsequent characters must be letters (as defined by the Character.isLetter() method), digits as defined by the Character.isDigit() method, dashes ( - ), or underscores ( _ ). To minimize the size of responses generated by JavaServer Faces, it is recommended that component identifiers be as short as possible. If a component has been given an identifier, it must be unique in the namespace of the closest ancestor to that component that is a NamingContainer (if any).
immediatebooleanYes Default Value: false

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.
intervalintYes Default Value: 5000

the time between poll events, in milliseconds. If the value is set to less than zero, polling will be disabled.
partialTriggersString[]Yes the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.
pollListenerjavax.el.MethodExpressionOnly EL a method reference to a poll listener
renderedbooleanYes Default Value: true

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). If you want to change a component's rendered attribute from false to true using PPR, set the partialTrigger attribute of its parent component so the parent refreshes and in turn will render this component.
timeoutintYes Default Value: 600000

If polling is used to update a page, there is a high that a page will never timeout, since the client keeps sending poll requests to the server. However, if we notice user inactivity after a certain amount of time we stop polling to give the application a chance to time out. By default the framework will use the value which has been configured in the web.xml, for the "oracle.adf.view.rich.poll.TIMEOUT" parameter. If there is also no value defined in the web.xml, we will use 10 minutes as the default value. However we allow page authors to override the value that is specified in web.xml on a per page base. The timeout property takes the number of milliseconds after which polling will stop, if there was no activity by the user, e.g. via keyboard or mouse. If there are multiple poll components on a page we take the maximum of their timeout values.