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 a good practive 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 key "ALL_VALUES".
You can use the special key ALL_VALUES to access all enum values.
DevelopmentProductionSystemTestUnitTest
<div class="card">
<p:importEnum type="jakarta.faces.application.ProjectStage" var="FacesProjectStages" />
<h5 class="mt-0">Development</h5>
<h:outputText value="#{FacesProjectStages.Development}" />
<h5>ALL_VALUES</h5>
<p>You can use the special key ALL_VALUES to access all enum values.</p>
<ui:repeat var="current" value="#{FacesProjectStages.ALL_VALUES}">
<h:outputText value="#{current}" styleClass="mb-2 block"/>
</ui:repeat>
</div>