参见
http://stackoverflow.com/questions/2524420/jsf-testing-for-enum-equality
If you have the enum
public enum Status {
YES, NO
}
you can reference the enums in your jsf pages like so:
<h:outputText value="text" rendered="#{myBean.status == 'YES'}"/>
I'm not so sure about the String evaluation, due to something I stumbled upon while refactoring some code to use enums: if you have a typo in your status String, ie:
<h:outputText value="text" rendered="#{myBean.status == 'YESSIR'}"/>
you will actually get a runtime error when you hit the page because the EL parser will try to coerce 'YESSIR' into a Status
enum and fail.