3 Replies Latest reply on Oct 30, 2008 6:56 AM by ilya_shaikovsky

    nested a4j:support ???

    nimo22

      I have this scenario:

      <h:inputText value="#{hello}">
       <a4j:support event="onblur" action="#{bean.doThis}"/>
       <a4j:support event="onblur" action="#{bean.AndDoThat}"/>
      </h:inputText>


      You see,
      I want to invoke two different methods, but this does not work.
      Only the first a4j:support with the method "doThis" will be invoked.

      How can I invoke the other method, too?
      How can I invoke two different methods within one event??

      (I do not want to change my bean class such as:

      public void doThis{
      
      ...
      this.AndDoThat();
      
      }



      Any suggestions?



        • 1. Re: nested a4j:support ???
          gizola


          What about creating a method:

          public void doThisAndThat()
          {
          doThis();
          AndDoThat();
          }

          And invoke just doThisAndThat with one a4j:support
          So you don't have to touch the doThis, and the AndDoThat methods, so they can be used by other events.

          Regards,

          Gizola

          • 2. Re: nested a4j:support ???
            nimo22

            yes thats clear:-)

            It seems, it is not possible to do it with a4j-tags alone, providing a list of method which should be invoked or nested a4j:supports..

            well, thanks.



            • 3. Re: nested a4j:support ???
              ilya_shaikovsky

              its possible to use nested f:selectActionListener tags. It could be more than one tag inside support defined.