[jboss-user] [JBoss Seam] - Problem with SelectOneMenu

hager do-not-reply at jboss.com
Thu Dec 13 04:55:23 EST 2007


Hello,
I'm using h:selectOneMenu and I have a problem : 
I fill my selectOneMenu with a List, when i submit my form, I remove the selected Item in the selectOneMenu.
In my java code, when i debug, the selectedValue is deleted from the List, BUT when the page is submitted, the element still here.
What's the problem, please help me. thanks

mypage.xhtml


<h:selectOneMenu id="selectOneAssignable"						value="#{activitesByCollaborateurCrossData.assignable}">
  | <s:selectItems
  | value="#{activitesByCollaborateurCrossData.availableLines}"
  | var="assign" label="#{assign.designation}"
  | id="selectAssignable" />
  | <s:convertEntity />
  | </h:selectOneMenu>
  | <h:commandLink action="#{activitesByCollaborateurCrossData.updateAssignable}">
  | <h:graphicImage value="img/add.png" />
  | </h:commandLink>


in  mybean.java

	public void addAssignable() {
  | 		if(this.assignable != null){
  | 			System.out.println("removed  =  "+this.availableLines.remove(this.assignable));
  | 			this.lignes.add(assignable);
  | 			listeAssignables.put(assignable.getDesignation(), assignable);
  | 			Totaux.put(assignable.getDesignation(), new Float(0));
  | 			this.updateTable();
  | 		}
  | 	}

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

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



More information about the jboss-user mailing list