• 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

ImportConstants

In older EL versions (< 3.0), it's not possible to use constants or any other static fields/methods in an EL expression, as it is not really a good practice to create beans with getter/setter for each constants class, we provide an utils tag which allows to import constant fields in a page. The constants can be accessed via the name of the class (default setting) or via a custom name (var attribute).

ImportConstants Tag Documentation

Utility tag to import constants.

NameTypeRequiredDefaultDescription
type String true The constants class.
var String false Name of the class without package. The EL variable which can be used to obtain the constants.
Loading...
Tag DocumentationNew DocumentationNew Documentation
Library
primefaces
DOWNLOAD_COOKIE
primefaces.download

Usage


<div class="card">
    <p:importConstants type="org.primefaces.util.Constants" var="PFConstants"/>

    <h5 class="mt-0">Library</h5>
    <h:outputText value="#{PFConstants.LIBRARY}" />

    <h5>DOWNLOAD_COOKIE</h5>
    <h:outputText value="#{PFConstants.DOWNLOAD_COOKIE}" />
</div>