• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

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

CookiePolicy

CookiePolicy provides a method to handle the acceptance of cookie policies within your web application.

CookiePolicy Tag Documentation

CookiePolicy conditionally renders its children based on cookie consent.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.

SaveCookiePolicy Tag Documentation

Tag Handler for saving a cookie policy.

NameTypeRequiredDefaultDescription
policy String true The cookie policy to be saved.
retention Integer false Retention period in seconds.
Tag Documentation
Basic usage

The basic configuration for accepting cookie policies. The choice is stored in a real cookie (pe:saveCookiePolicy, retention 10 seconds here). While it is valid the panel stays hidden; afterwards it shows again on reload.

PrimeFaces Extensions Cookie Policy
Do you agree with our cookie policy for about 10 seconds?

Usage


<div class="card">
    <h5>Basic usage</h5>
    <p>The basic configuration for accepting cookie policies. The choice is stored in a real cookie (<code>pe:saveCookiePolicy</code>, retention 10 seconds here). While it is valid the panel stays hidden; afterwards it shows again on reload.</p>
    <h:form id="formBasic">
        <pe:cookiePolicy id="cookiePolicy">
            <p:panel header="PrimeFaces Extensions Cookie Policy">
                Do you agree with our cookie policy for about 10 seconds?
                <h:panelGrid columns="2">
                    <p:commandButton value="Only essential cookies" update="cookiePolicy">
                        <pe:saveCookiePolicy policy="essential" retention="#{10}"/>
                    </p:commandButton>
                    <p:commandButton value="Accept all cookies" update="cookiePolicy">
                        <pe:saveCookiePolicy policy="essential,statistics" retention="#{10}"/>
                    </p:commandButton>
                </h:panelGrid>
            </p:panel>
        </pe:cookiePolicy>
    </h:form>
</div>