Comment accéder aux propriétés enum dans EL?

Le suivant enum.

public enum Constants
{
    PAGE_LINKS(10);
    //Other constants as and when required.

    private final int value;

    private Constants(int value){
        this.value = value;
    }

    public int getValue(){
        value;
    }    
}

Ce enum est placé dans une application étendue bean comme si,

@ManagedBean
@ApplicationScoped
public final class ConstantsBean
{
    private Constants constants;

    public ConstantsBean() {}

    public Constants getConstants() {
        return constants;
    }
}

Comment accéder à la valeur de PAGE_LINKS en EL?

<p:dataGrid pageLinks="#{}".../>

Ce qui devrait être écrit dans #{}? Est-il possible?


EDIT:

La modification de la fève de la manière suivante,

@ManagedBean
@ApplicationScoped
public final class ConstantsBean
{
    public ConstantsBean() {}

    public int getValue(Constants constants) {
        return constants.getValue();
    }
}

et ensuite l'accès à EL comme,

<p:dataGrid pageLinks="#{constantsBean.getValue('PAGE_LINKS')}".../>

fonctionne en quelque sorte, mais je ne crois pas en cette laide.

source d'informationauteur Tiny