[jboss-user] [JBoss Seam] - s:selectItems and convertEnum and order of enum retention

tony.herstell@gmail.com do-not-reply at jboss.com
Thu Jan 10 03:52:38 EST 2008


Given


  | <h:selectOneRadio id="booking_duration_selection" value="#{bookingController.duration}" layout="pageDirection">
  | 	<s:selectItems value="#{bookingController.getBookingDurationsKind()}" var="bookingDurationKind" label="#{messages[bookingDurationKind.inlLabel]}"/>
  | 	<s:convertEnum />
  | 	<a4j:support event="onclick" reRender="bookingCourseType, resourceAddButtons, resourceAddedTable" />
  | </h:selectOneRadio>
  | 

Backed by 

  |     public enum BookingDurationsKind {
  |     	ONE_HOUR_PRIVATE ("booking_1hrprivate"),
  |     	ONE_HOUR_OPEN ("booking_1hropen"),
  |     	COURSE ("booking_course");
  |         private final String inlLabel;
  |         BookingDurationsKind(String inlLabel) {
  |             this.inlLabel = inlLabel;
  |         }
  |         public String getInlLabel() { return inlLabel; }
  |     }
  | 

Can I somehow retain the order of the enum when its displayed as checkboxes? There is no attribute etc...


On the screen I get:

  | Open 1 Hour Booking (anyone may book the same slot within system limit of 6 people!)
  | Private 1 Hour Booking
  | Course Booking
  | 

Where private booking should be topmost.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118526#4118526

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118526



More information about the jboss-user mailing list