3 Replies Latest reply on Jan 3, 2008 12:46 AM by sergeysmirnov

    a4j:form: ajaxSubmit, limitToList, and reRender

    dkarr

      I have a couple of questions from the doc pages for a4j:form.

      The info for "ajaxSubmit" says:

      "If true, it becomes possible to set AJAX submission way for any components inside"

      Uh, that means what?

      Also, in the "Key attributes and ways of usage" section for this tag, it refers to the "ajax" attribute, not "ajaxSubmit".

      Second, I don't understand the difference between "limitToList" and "reRender". The docs for each of these seem to be about the same thing.

      In general, the docs could use better examples of usage variations of each tag and attribute.

        • 1. Re: a4j:form: ajaxSubmit, limitToList, and reRender

           

          "dkarr" wrote:

          The info for "ajaxSubmit" says:

          "If true, it becomes possible to set AJAX submission way for any components inside"

          Uh, that means what?


          if you have h:commandButton inside the form, it will work as a Ajax command button. The same for h:commandLink.

          See http://livedemo.exadel.com/richfaces-demo/richfaces/form.jsf?c=form


          "dkarr" wrote:

          Also, in the "Key attributes and ways of usage" section for this tag, it refers to the "ajax" attribute, not "ajaxSubmit".


          ajaxSubmit is not a key attribute. The number of cases where it might be useful is very narrow.

          "dkarr" wrote:

          Second, I don't understand the difference between "limitToList" and "reRender". The docs for each of these seem to be about the same thing.


          limitToList might be "true" or "false". reRender is a list of components explicitly defined for re-Render. So, it is very hard to replace one with another.

          There are two ways to define what should be re-rendered after an Ajax response:
          1. reRender attribute
          2. blocks of text wrapped with < a4j:outputPanel ajaxRendered="true" >

          if limitToList is true, only the reRender attribute is taken in account. Blocks with ajaxRendered="true" are ignored.



          • 2. Re: a4j:form: ajaxSubmit, limitToList, and reRender
            dkarr

             

            "SergeySmirnov" wrote:
            "dkarr" wrote:

            The info for "ajaxSubmit" says:

            "If true, it becomes possible to set AJAX submission way for any components inside"

            if you have h:commandButton inside the form, it will work as a Ajax command button. The same for h:commandLink.


            My suggestion is that "AJAX submission way" doesn't mean anything. It would be good if this was reworded to be clearer. I still don't understand what you're trying to say, so I can't even suggest anything.

            "SergeySmirnov" wrote:

            "dkarr" wrote:

            Also, in the "Key attributes and ways of usage" section for this tag, it refers to the "ajax" attribute, not "ajaxSubmit".


            ajaxSubmit is not a key attribute. The number of cases where it might be useful is very narrow.


            All I'm saying here is that in section 6.16.4, it says the following:

            'Beginning with release 1.0.5 additional attributes that make this form variant universal have appeared.
            With a new attribute definition as ajax= "true"'

            I think that "ajax" is supposed to be "ajaxSubmit".

            "SergeySmirnov" wrote:

            "dkarr" wrote:

            Second, I don't understand the difference between "limitToList" and "reRender". The docs for each of these seem to be about the same thing.


            limitToList might be "true" or "false". reRender is a list of components explicitly defined for re-Render. So, it is very hard to replace one with another.

            There are two ways to define what should be re-rendered after an Ajax response:
            1. reRender attribute
            2. blocks of text wrapped with < a4j:outputPanel ajaxRendered="true" >

            if limitToList is true, only the reRender attribute is taken in account. Blocks with ajaxRendered="true" are ignored.



            Ok, I understand now. Wouldn't it be better if "limitToList" was described like this:

            'If "true", updates on client side ONLY elements from
            this 'reRender' property. If "false" (default) updates all
            region components with "ajaxRendered" = "true" '


            • 3. Re: a4j:form: ajaxSubmit, limitToList, and reRender

               

              "dkarr" wrote:

              My suggestion is that "AJAX submission way" doesn't mean anything. It would be good if this was reworded to be clearer. I still don't understand what you're trying to say, so I can't even suggest anything.


              just write you own text and contribute.