This content has been marked as final.
Show 1 reply
-
1. Re: newbie: how to access enums in webpage
mars1412 Mar 25, 2008 11:19 AM (in response to mars1412)finally I decided to use a variation of version 2:
I add one check function for every status on my enum entitiy - seems to be the best compromise for me.
public enum WebUserStatus { ACTIVE, DEACTIVATED, ... public boolean isRegistered() { return this.equals(REGISTERED); } public boolean isDeactivated() { return this.equals(DEACTIVATED); }
so I can use this in my page:
rendered="#{webUser.status.deactivated}">