jsf 2 - Is there a comfortable way to pass an enum to my JSF view? -
in jsf application there several drop downwards menus, enum selectitems in background.
currently using applcationscoped managedbean pass them view:
@managedbean(name="applicationutil") @applicationscoped public class applicationutil implements serializable { public myenum [] getvalues() { homecoming myenum.values(); } } for improve reusability i'd have similar e.g. facesvalidator-annotation create available in jsf view. somehting like
@enum("com.stackoverflow.myenum") public enum myenum { // } is there similar available enums? think quite mutual task, didn't find solution this. or maybe there reasons why bad idea?
jsf jsf-2 enums
No comments:
Post a Comment