Poll (<b:poll >)

<b:poll /> refreshes a part of the screen periodically. It can also call an action or an actionListener.

Basic usage

Current time: Sun Sep 24 15:38:15 UTC 2017

AJAX breaking change in 1.1.2

Prior to BootsFaces 1.1.2, the attributes update and execute where simply passed to the HTML code. Since 1.1.2, they are evaluated by the advanced search expression engine of BootsFaces, as they should. However, this may break programs relying on the bug (such as this showcase).

JavaScript API since 1.1.2

You can access the JavaScript API by setting the widgetVar attribute. This attribute is the name of the JavaScript object implementing <b:poll /> on the client side. Currently, the public API consists of a stop and (re)start function:

Current time:
Sun Sep 24 15:38:15 UTC 2017
Counter:
Attribute Default value Description
action none Calls a JSF bean method and initiates a navigation.
actionListener none Calls an action listener in the JSF bean.
execute @none Which input fields are to be sent?
interval 1000 How often is the poll action to be called? Denotes the number of milliseconds between polls.
update @form Which region of the screen is to be updated?
stop false If true, the poll will stop.
widgetVar none Optional widget variable to access the datatable widget in JavaScript code.