JARCH SHOWCASE
JARCH SHOWCASE
ImportEnum In older EL versions (< 3.0), it's not possible to use enum 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 enum values in a page.

The enum values can be accessed via the name of the class (default setting) or via a custom name (var attribute).
It also possible to get all enum values of the class with the "ALL_VALUES" suffix or a custom prefix via the "allSuffix" attribute.
Development: Development
ALL: Development   UnitTest   SystemTest   Production  
<a:importEnum type="javax.faces.application.ProjectStage" var="JsfProjectStages" allSuffix="ALL_ENUM_VALUES" />

Development: #{JsfProjectStages.Development}  

<br/>

ALL:   
<ui:repeat var="current" value="#{JsfProjectStages.ALL_ENUM_VALUES}">  
    <h:outputText value="#{current}" />    
</ui:repeat>>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.