[jboss-user] [JBoss Seam] - selectOneMenu and selectItems problem

mttu do-not-reply at jboss.com
Tue Jul 10 17:26:11 EDT 2007


Hi I can't see value of selected item in my backed bean which is Stateful bean.
I can see values of selectOneMenu many component but there is no selected
values passed into backed bean after submit.

seam 1.2.1
jboss 4.0.5



  | <rich:panel rendered="#{CandidateAction.newShortListStep ==  1}">
  | 			<f:facet name="header">
  | 				<h:outputText value="#{messages['shortlist.add_new']}" />
  | 			</f:facet>
  | 
  | 			<h:selectOneMenu id="selectedJobType" value="#{CandidateAction.selectedCompany}" converter="CompanyConverter"
  | 				onchange="submit()">
  | 				<s:selectItems value="#{CandidateAction.companies}" var="cmp" label="#{cmp.name}"
  | 					oSelectionLabel="#{messages['select.company']}" />
  | 				<!--
  | 					<a4j:support event="onchange" reRender="cpos" ajaxSingle="true" />
  | 					-->
  | 			</h:selectOneMenu>
  | 
  | 

and bean



  | 
  | @Stateful
  | @Scope(ScopeType.CONVERSATION)
  | @Name("CandidateAction")
  | public class CandidateAction extends BaseAction implements ICandidate {
  | 
  | 	...
  | 
  | 	private Company selectedCompany;
  | 
  | 	...
  | 
  | 	public Company getSelectedCompany() {
  | 		return selectedCompany;
  | 	}
  | 
  | 	public void setSelectedCompany(Company selectedCompany) {
  | 		this.selectedCompany = selectedCompany;
  | 	}
  | 
  | 	
  | }
  | 
  | 


selectedCompany is always NULL (Method setSelectedCompany is not called). Bot methods are defined in ICandidate interface.




Thanks for help,

Mttu





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

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



More information about the jboss-user mailing list