I have generic class with this signature:
public abstract class EnumListBean<E extends Enum<E>> {
public List<E> getEnumList() {
//implementation details
}
}
Currently I have to define a empty subclass in order to access the enumList property for a concrete generic parameter:
@ManagedBean
@ApplicationScoped
public class ItemRarityBean extends EnumListBean<Item.Rarity>{
}
This makes its possible to access the property e.g:
<f:selectItems value="#{itemRarityBean.enumList}" var="rarity"
itemLabel="#{rarity.readableName}" itemValue="#{rarity}" />
Im wondering whether one really have to declare a deriving bean but cant access the generic class as bean directly:
<f:selectItems value="#{enumListBean<Item.Rarity>.enumList}" var="rarity"
itemLabel="#{rarity.readableName}" itemValue="#{rarity}" />