Locale

Language
English
English
English
French
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Czech
Greek
Persian
Finnish
Danish
Hindi
Indonesian
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese
Chinese

Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

Saga Saga
Vela Vela
Arya Arya

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

Timeline Lazy loading of events

Timeline supports lazy loading of events during moving / zooming in the timeline. This makes sense when event's loading is time-consuming. Events are loaded lazy when p:ajax with event="lazyload" is attached to the p:timeline tag. The event class TimelineLazyLoadEvent contains one or two time ranges the events should be loaded for (two times ranges occur when you zoom out the timeline).

Note: The "lazyload" listener is not invoked again when the visible time range (incl. some hidden ranges defined by preloadFactor) already has lazy loaded events.


<div class="card">
    <h:form id="form">
        <p:growl id="growl" showSummary="true" showDetail="false">
            <p:autoUpdate/>
        </p:growl>

        <div id="loadingText" style="font-weight:bold; margin:-5px 0 5px 0; visibility:hidden;">Loading ...
        </div>

        <p:timeline id="timeline" value="#{lazyTimelineView.model}"
                    preloadFactor="#{lazyTimelineView.preloadFactor}"
                    zoomMax="#{lazyTimelineView.zoomMax}" minHeight="170">
            <p:ajax event="lazyload" update="@none" listener="#{lazyTimelineView.onLazyLoad}"
                    onstart="$('#loadingText').css('visibility', 'visible')"
                    oncomplete="$('#loadingText').css('visibility', 'hidden')"/>
        </p:timeline>

        <h:panelGrid columns="2" style="margin-top:15px">
            <p:spinner id="spinner" value="#{lazyTimelineView.preloadFactor}"
                       min="0" max="1" stepFactor="0.05"/>
            <p:commandButton value="Update Preload Factor" process="@this spinner" update="timeline"
                             action="#{lazyTimelineView.clearTimeline}"
                             style="margin-left:5px"/>
        </h:panelGrid>
    </h:form>
</div>