[jboss-user] [JBoss Seam] - Re: No selected element from <h:selectOneListbox>

jmodadams do-not-reply at jboss.com
Fri Jan 11 12:26:10 EST 2008


I believe the problem here is that you have not specified a value attribute in the h:selectOneListbox tag, which is how you bind the selected value to your backing bean.

If you were to add a video property to your manager bean with a public setter method, you could then do the following:


  | <h:selectOneListbox size="10" value="#{manager.video}">
  |   <s:selectItems value="#{videos}" var="video" label="#{video.name}" />
  |   <s:convertEntity />
  | </h:selectOneListbox>
  | 
  | <h:commandButton type="submit" action="#{manager.editVideo()}" value="Change"></h:commandButton>
  | 

Also, make sure that the listbox and commandButton components are wrapped inside of an <h:form> tag or the values will not be posted to the server upon submission.

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

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



More information about the jboss-user mailing list