Theme
Timer
You can choose the direction of your timer changing the "forward" attribute.
Forward Backward
Source
<h:panelGrid columns="2">
    <h:outputText value="Forward"/>
    <h:outputText value="Backward"/>
    <pe:timer
        timeout="1000"
        forward="true"/>
    <pe:timer
        timeout="1000"
        forward="false"/>
</h:panelGrid>
            
Components and more
Documentation pe:timer
Attributes (move mouse over the names to see data types)
Name Description
id Unique identifier of the component in a namingContainer.
rendered Boolean value to specify the rendering of the component, when set to false component will not be rendered.
visible set to true to hide the timer. The listener will be fired anyway
binding An el expression referring to a server side UIComponent instance in a backing bean.
widgetVar Name of the client side widget.
timeout Timeout in seconds to do the ajax ajax requests. Default is 10.
interval Interval in milliseconds the timer fires. Default is 1000.
update Component(s) to be updated with ajax.
listener A method expression to invoke by polling.
immediate Boolean value that determines the phaseId, when true actions are processed at apply_request_values, when false at invoke_application phase.
onstart Javascript handler to execute before ajax request is begins.
oncomplete Javascript handler to execute when ajax request is completed.
process Component id(s) to process partially instead of whole view.
onerror Javascript handler to execute when ajax request fails.
onsuccess Javascript handler to execute when ajax request succeeds.
global Global ajax requests are listened by ajaxStatus component, setting global to false will not trigger ajaxStatus. Default is true.
delay If less than delay milliseconds elapses between calls to request() only the most recent one is sent and all other requests are discarded. The default value of this option is 300. If the value of delay is the literal string 'none' without the quotes, no delay is used.
format The format to use when diplaying the value. Accepted values are: 'percentage' to diplay the remaining time as percentage. 'Human' to print a human readable interval. Any other value will be evaluated as a moment.js format
formatFunction client-side function used to format the remaining duration
async When set to true, ajax requests are not queued. Default is false.
autoStart In autoStart mode, the timer will start immediatly. Default is true.
forward Use this attribute to set the timer direction. Default value is false (backward)
singleRun set to true to false the timer periodic. Default is true
partialSubmit When enabled, only values related to partially processed components would be serialized for ajax instead of whole form.
resetValues If true, indicate that this particular Ajax transaction is a value reset transaction. This will cause resetValue() to be called on any EditableValueHolder instances encountered as a result of this ajax transaction. If not specified, or the value is false, no such indication is made.
ignoreAutoUpdate If true, components which autoUpdate="true" will not be updated for this request. If not specified, or the value is false, no such indication is made.
ontimerstep Javascript handler executed every second
ontimercomplete Javascript handler executed the timeout stops
PrimeFaces Extensions Showcase - © 2011-2019, PrimeFaces: 7.0, PrimeFaces Extensions: 7.0, JSF: mojarra 2.3.2, Server: jetty/9.4.2.v20170220, Build time: 2019-03-18 20:52
occured!
Message:
Timestamp:
StackTrace: