3 Replies Latest reply on Nov 7, 2008 12:45 PM by christiaan

    s:link strange behaviour

    mickgiu.mickgiu.gmail.com

      Hi,
      i have a page in which i have a h:selectOneMenu, a h:inputText and a a4j:commandButton.
      Pressing button i open a rich:modalPanel in which i show a list of records.
      Using s:link i get record selected, hide rich:modalPanel and populate h:inputText in main page.
      All is ok.
      When i have a value in h:selectOneMenu and return from s:link this value is deleted as
      page is refreshed and i have to put this value again.
      Can someone help me to prevent this.
      Thanks in advance


      Michele

        • 1. Re: s:link strange behaviour
          stefanotravelli

          Don't forget that s:link does NOT submit the form.


          Hope this helps.


          stefano

          • 2. Re: s:link strange behaviour
            mickgiu.mickgiu.gmail.com

            Thanks Stefano,
            s:link does NOT submit the form i have an action in it as you can see.



            <s:link
            action="#{fascicolomanager.decodificaArticoloSelezionato}"
            onclick="Richfaces.hideModalPanel('articoliSearch');">
            <h:outputText value="#{riga.articoli.cdartm}" />
            </s:link>



            the problem is in h:selectOneMenu



            <h:selectOneMenu styleClass="dropdown"
            value="#{fascicolomanager.tipoevento}" id="tipoevento">
            <s:selectItems value="#{fascicolomanager.tipoeventoList}"
            var="referenti" label="#{referenti.destipoevento}"
            noSelectionLabel="..." />
            <s:convertEntity />
            </h:selectOneMenu>


            • 3. Re: s:link strange behaviour
              christiaan

              Because you're using s:link, and as a result not submitting the form, the value chosen in the selectOneMenu is not send, so your backend cannot know the selection if the form hasn't been submitted previously.