10 Replies Latest reply on Apr 16, 2008 10:02 AM by Carsten Hoehne

    Problem with selectOneMenu and Conversation

    Carsten Hoehne Master


      i do have a problem which i assume to be reported in the past. But i can not find any sign of it:-(
      So here it goes again. If someone can give me a hint how to solve it or a pointer to the original problem it will be very helpful.

      This is my page.xml (a conversation is started)

      <page ...>
          <begin-conversation join="true"/>

      This is the corresponding xhtml page with a selectOneMenu and three buttons.

           <f:facet name="header">
                <h:outputText value="Select Accessions" />
                <h:selectOneMenu value="#{selectEvaluation.evaluation}" id="evalselect">
                     <s:selectItems value="#{evaluationList}" var="eval"
                                    label="#{eval.evaluationId}" noSelectionLabel="Please select..." />
                     <s:convertEntity />
                     <a4j:support action="#{selectEvaluation.selectEvaluation}" event="onchange"/>
                <s:button value="select Standards" view="/fieldplan/html/selectStandards"/>
                <s:button value="select Targets" view="/fieldplan/html/selectTargets"/>
                <h:commandButton value="Generate Fieldplan" action="#{selectAccession.generate}"/>

      Problem is:

      when visiting the page the user can select from the menu and the selection is stored in the context. All subpages (calles with the button) are referencing the correct selected value.

      But when returning from a subpage the selectOneMenu does not show the selected value and further more there is no list to choose from:-(

      Here comes the backing bean:

      public class SelectEvaluationBacking {
           @Logger Log log;
           private Evaluation evaluation;
           private Evaluation selectedEvaluation;
           @In EvaluationQuery evaluationQuery;
           List<Evaluation> evaluationList;
           public void initialize(){
                log.info("selectEvaluation created");
           public void initEvaluationList(){
                log.info("selectEvaluation created");
           public void selectEvaluation(){
                log.info("selectEvaluation: #0", evaluation);
      [getters and setters stripped of]

      I suppose that this is not a seam problem. But perhaps someone can shed a little bit of light on this,(again?)