5 Replies Latest reply on Feb 10, 2009 2:34 PM by nimo stephan

    a4j:log question

    nimo stephan Master

      When I do a ajax-call, then my a4j:log shows me under "Full response content:" the whole JSF-Page instead of only the part of the page which should be updated, though only a part is updated. Is that normal? Where can I see only the part of the view-tree which is updated

      ...
      Reqest end with state 4
      debug[13:49:15,382]: Response with content-type: text/xml;charset=UTF-8
      debug[13:49:15,389]: Full response content: <?xml version="1.0"?> <html xmlns=[shows me the whole JSF-View...]
      ...


        • 1. Re: a4j:log question
          Ilya Shaikovsky Master

          should be only updated content. show your page and describe RF env.

          • 2. Re: a4j:log question
            nimo stephan Master

            RF 3.3.0.

            Well, I guess I know the reason.

            Hello ilya,

            I have found the reason:

            I uses this before:

            <h:form>
             <a4j:outputPanel>
             <h:inputText value="#{myValue}">
             <a4j:support ajaxSingle="true" event="onchange" reRender="test" limitToList="true"/>
             </h:inputText>
            
             <h:outputText id="test" value="#{myValue}" />
             </a4j:outputPanel>
             </h:form>
            </h:form>



            Now, I use this and all works (only the region is rendered:)

            <h:form>
             <a4j:region renderRegionOnly="true">
             <h:inputText value="#{myValue}">
             <a4j:support ajaxSingle="true" event="onchange" reRender="test" limitToList="true"/>
             </h:inputText>
            
             <h:outputText id="test" value="#{myValue}" />
             </a4j:region>
             </h:form>
            </h:form>



            So "renderRegionOnly=true" did it well.
            I have thought, the "limitToList=true" fullfills the same as renderRegionOnly, am I wrong?

            • 3. Re: a4j:log question
              Ilya Shaikovsky Master

              It's pretty strange. You could visit
              http://livedemo.exadel.com/richfaces-demo/richfaces/log.jsf

              and check the log output after typing inside the input. Only output to be reRendered is returned.

              • 4. Re: a4j:log question
                nimo stephan Master

                the demo seems to be working as expected (however, there is only one ajax-control).

                But for me, I really have to use <a4j:region renderRegionOnly="true">, even thought I have declared ajaxSingle="true" and limitToList="true".

                I use Trinidad, too. And I do not know if there is a issue in AJAX-Calls. But I do not make explicit use of Trinidad-Ajax-Calls in my whole project, as I use only a4j..

                By the way, the docu says (page 28):

                limitToList = "false" means to update only the area(s) that mentioned in the "reRender" attribute explicitly.


                Should it be not:

                limitToList = "true" means to update only the area(s) that mentioned in the "reRender" attribute explicitly.


                • 5. Re: a4j:log question
                  nimo stephan Master

                  Hello,

                  I have red the RF-Manual, and found out, that I mixed up few ajax-concepts:

                  Decide What to Send (page 40):
                  -> in a4j:log, "Full response content:" lists the view, what was sent!

                  Decide What to Change (page 40):
                  in a4j:log, "Evaluate script replaced area in document:" lists the view, what was processed!

                  So with this, only the ID with "myForm:test" is replaced:
                  (Decide What to Change!)

                  <h:form id="myForm">
                   <a4j:outputPanel>
                   <h:inputText value="#{myValue}">
                   <a4j:support ajaxSingle="true" event="onchange" reRender="myForm:test" limitToList="true"/>
                   </h:inputText>
                  
                   <h:outputText id="test" value="#{myValue}" />
                   </a4j:outputPanel>
                   </h:form>
                  </h:form>


                  But all the form is sent (Decide What to Send!). This is okay, because I have not explicit decided what to send and can "Decide What to Send" only by setting renderRegionOnly=true:

                  <h:form id="myForm">
                   <a4j:region renderRegionOnly="true">
                   <h:inputText value="#{myValue}">
                   <a4j:support ajaxSingle="true" event="onchange" reRender="myForm:test" limitToList="true"/>
                   </h:inputText>
                  
                   <h:outputText id="test" value="#{myValue}" />
                   </a4j:region>
                   </h:form>
                  </h:form>


                  Now, with the last code, the a4j:log shows me:
                  "Full response content:" shows me only the tree with node "myForm".
                  "Evaluate script replaced area in document:" shows me only the form with ID "myForm:test".

                  So now, I am happy, as all is working well :-)


                  The last thing, which I am not really sure, to understand, is:

                  "Decide what to process." Is this the sum of "Decide What to Change" and "Decide What to Send"? I guess, yes! If not, please correct me. thanks.