[jboss-user] [JBoss Seam] - Clearing entity field through a selectOneMenu

erik.d.hellman@gmail.com do-not-reply at jboss.com
Tue Nov 6 08:27:09 EST 2007


I have a selectOneMenu that contains a list of entities. When selecting an entry in the list and submitting the form, the selected entity will be set as a reference in another entity (i.e., the entity we are editing). 

Now, if I want to clear this reference using the selectOneMenu, how would I do then? Currently, my JSF-page looks like this:

<h:selectOneMenu value="#{edt.workShift}" styleClass="thinSelectMenu" required="false" rendered="#{emt.editMode}" >
  |    <s:convertEntity />
  |    <s:selectItems value="#{workShifts}" var="workShift" label="#{workShift.name}" noSelectionLabel="-"/>
  | </h:selectOneMenu>

It doesn't work adding a custom entry with an empty value. Any suggestions on how to solve this?

// Erik

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

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



More information about the jboss-user mailing list