1 2 Previous Next 19 Replies Latest reply on Nov 2, 2008 12:25 AM by valatharv Go to original post
      • 15. Re: Pls help Issue with displaying persited value for h:selectOneMenu, s:selectItems
        joblini

        I think you either have to remove @Transient from experimentTableIndex (make it persistent)
        or make the conversation surround all of the commands (remove all the <end-conversation/>


        In our application the type used in the selectOneMenu is not @Transient.


        Hope this helps!

        • 16. Re: Pls help Issue with displaying persited value for h:selectOneMenu, s:selectItems
          valatharv

          Thanks Ingo, I will try your changes and will you...


          Once again thanks for looking into it....

          • 17. Re: Pls help Issue with displaying persited value for h:selectOneMenu, s:selectItems
            valatharv

            Sorry for typo... I will try your changes and will let you know...

            • 18. Re: Pls help Issue with displaying persited value for h:selectOneMenu, s:selectItems
              valatharv
              Our purpose to make it Transient was just to read the values from ExperimentTableIndex and persist it in QuantExperiment.

              I tried removing "<end-conversation/>" in StudyEdit.page.xml but no effect...

              See if I place a lable just next to dropdown, it shows the updated dropdown value, just thinking of any alternate approach like show both label & dropdown to user and add (noSelectionLabel="select experiment name ...") to dropdown then some how validate on update if dropdown value is "select experiment name ..." use lable value...

              Any suggestions.... ?

              <s:decorate id="experimentNameDecoration" template="layout/edit.xhtml">
              <ui:define name="label">Experiment Name</ui:define>
              <h:selectOneMenu value="#{quantExperimentHome.instance.experimentTableIndex}"
                 label="#{quantExperimentHome.instance.experimentName}">
              <s:selectItems value="#{experimentTableIndexList.resultList}"
                 var="experimentTableIndex" label="#{experimentTableIndex.experimentName}"/>
              </h:selectOneMenu>
              <s:label value="#{quantExperimentHome.instance.experimentName}"></s:label>
              </s:decorate>
              • 19. Re: Pls help Issue with displaying persited value for h:selectOneMenu, s:selectItems
                valatharv
                Sorry for the delay in responding, I was busy in fixing other priority issues.

                Issue with displaying persisted value in dropdown, when we click "Edit", default value selected should the one of existing experiment name, but default value of dropdown is the first value in list.

                I tried various options but no success ..:(
                a) We cannot remove transient as our purpose to make it Transient was just to read the values from ExperimentTableIndex and persist it in QuantExperiment.

                b) Removed "<end-conversation/>" in StudyEdit.page.xml but no effect...

                If I try noSelectionLabel, it displays the persisted value as 1st value in dropdown but if user does not change dropdown and click update it will give "javax.faces.el.EvaluationException: java.lang.NullPointerException
                     at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)"

                Any suggestions on how to handle this... :(

                <s:decorate id="experimentNameDecoration" template="layout/edit.xhtml">
                    <ui:define name="label">Experiment Name</ui:define>
                     <h:selectOneMenu id="expName"
                           value="#{quantExperimentHome.instance.experimentTableIndex}"
                            label="#{quantExperimentHome.instance.experimentName}">
                      <s:selectItems id="expName" value="#{experimentTableIndexList.resultList}"
                      var="experimentTableIndex" label="#{experimentTableIndex.experimentName}"
                noSelectionLabel="#{quantExperimentHome.instance.experimentName}>
                      </s:selectItems>
                     </h:selectOneMenu>
                </s:decorate>    



                1 2 Previous Next