JARCH SHOWCASE
JARCH SHOWCASE
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 "cool" 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).
LIBRARY: primefaces
DOWNLOAD_COOKIE: primefaces.download
<a:importConstants type="org.primefaces.util.Constants" var="PFConstants" />

LIBRARY:  
<h:outputText value="#{PFConstants.LIBRARY}" />

<br />

DOWNLOAD_COOKIE:
<h:outputText value="#{PFConstants.DOWNLOAD_COOKIE}" />
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.