[jboss-user] [JBoss Seam] - Enums in JSF code
Frippe
do-not-reply at jboss.com
Wed Jun 13 08:52:04 EDT 2007
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:
@Name("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
More information about the jboss-user
mailing list