- Enums in JSF code 2007-06-13 - By Frippe
Back Hi, I have a xhtml file where I try to use an enum I've created for my system. The enum works when I use it to set values on entities' properties and can also print the enum, set as a value in an entity, in the xhtml file.
But I can't seem to be able to create a rendered condition or print a value directly from the enum #{PStatus.ACTIVE}
My enum: @(protected)("pStatus") | public enum PStatus { | INITIATED(0), ACTIVE(1), DRAWING_DONE(2), CLOSED(3); | | private int value; | | private PStatus(int value) { | this.value = value; | } | | public int getValue() { | return(value); | } | }
Part of my xhtml file: <h:column rendered="#{bookable.week.period.status == PStatus.ACTIVE}"> | <h:commandLink action="#{subscriptionView.sortBy('email')}" value="Vinnare" /> | </h:column>
What am I missing here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4053939#4053939
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4053939 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|