5 Replies Latest reply on Jul 11, 2008 6:56 PM by rolandotr

    a4j:support & reRender Problem, anybody can help?

    rolandotr

      this doesn´t work as I expected

      <h:form>
       <h:inputText value="#{bean.text}">
       <a4j:support event="onkeyup" reRender="repeater" />
       </h:inputText>
       <h:inputText id="repeater" value="#{bean.text}" />
      </h:form>
      

      I want to know why, please somebody say something, more details could be found in http://www.jboss.com/index.html?module=bb&op=viewtopic&t=137135.

        • 1. Re: a4j:support & reRender Problem, anybody can help?
          pfreitas

          The code you posted should work...

          i did an example with the same logic... and it worked...

          your problem must be somewhere else in your code...

          <h:form>
           <a4j:commandLink action="#{graficosMBean.changeIt}" value="ooo" reRender="doxo"/>
           <h:outputText id="doxo" value="#{graficosMBean.hey}" />
          </h:form>
          


          • 2. Re: a4j:support & reRender Problem, anybody can help?
            pfreitas

            I took a look at you backing bean...

            and I guess that this way works better


            this is the backing bean i'm using on the page i posted before

            just place your input with a4j:support instead of my command link

             private String hey = "Hey!!";
            
             public String changeIt() {
             setHey("Hey yo silver !!");
             return null;
             }
            
             public String getHey() {
             return hey;
             }
            
             public void setHey(String hey) {
             this.hey = hey;
             }
            


            • 3. Re: a4j:support & reRender Problem, anybody can help?
              rolandotr

              Thanks for reply. Well in the first post, your code work because two probably reasons:
              first: The component target of reRender is h:outputText and my problem is with h:inputText and others.
              second: Maybe the commandLink cause a complete rerender of all the tree so every is rerender without problems.
              About the second post ok.
              But believe me, the richfaces reference present in the a4j:support section an example with h:outputText and work fine, but if you replace h:outputText for h:inputText does not work.

              Could you tell me something more?

              • 4. Re: a4j:support & reRender Problem, anybody can help?
                ilya_shaikovsky

                make your support ajaxSingle or wrap first input into a4j:region. And it will works.

                • 5. Re: a4j:support & reRender Problem, anybody can help?
                  rolandotr

                  Great thanks it really work, but in richfaces reference about ajaxSingle they only said
                  "if "true", submits ONLY one field/link, instead of all
                  form controls".

                  I don't see with this explanation why ajaxSingle="true" make it work. Could you explain to me or suggest me a book or article?
                  Anyway, thanks a lote.