7 Replies Latest reply on Jul 12, 2007 6:06 AM by Pete Muir

    selectOneMenu and selectItems problem

    sdfsd fsdfs Newbie

      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