7 Replies Latest reply on Jan 24, 2008 12:58 PM by Sergey Smirnov

    rendered=

    Tony Herstell Master

      I have various buttons/spinners that contribute to a total (all ajaxified so updating an area of the page).

      If I use buttons to decrease the total value to 0 all is well the total disappears.

      If I use spinners to reduce/increase the value all is well.

      HOWEVER if I use ANY spinner to reduce the value to 0 then the following rendered gets ignored... i.e. the total is NOT changed.

      Any ideas?

      <h:outputText id="resourcesAddedTotal" value="#{messages.booking_total_price} #{bookingController.getTotalPrice()}"
       rendered="#{bookingController.getTotalPrice() != '$0.00'}"/>
      


        • 1. Re: rendered=
          Tony Herstell Master

           

          debug[22:48:23,681]: Event occurs, create waiting for request in queue eventsQueue
          debug[22:48:24,181]: End delay waiting, make request in queue eventsQueue
          debug[22:48:24,181]: NEW AJAX REQUEST !!! with form :j_id12
          debug[22:48:24,181]: Append text control j_id12:nightBeforeStableNumbers with value [0] and value attribute [0]
          debug[22:48:24,181]: Append text control j_id12:nightBeforeYardNumbers with value [0] and value attribute [0]
          debug[22:48:24,181]: Append hidden control j_id12 with value [j_id12] and value attribute [j_id12]
          debug[22:48:24,181]: Append hidden control autoScroll with value [] and value attribute []
          debug[22:48:24,181]: Append hidden control j_id12:_idcl with value [] and value attribute []
          debug[22:48:24,181]: Append hidden control j_id12:_link_hidden_ with value [] and value attribute []
          debug[22:48:24,181]: Append hidden control javax.faces.ViewState with value [_id43] and value attribute [_id43]
          debug[22:48:24,181]: parameter j_id12:j_id95 with value j_id12:j_id95
          debug[22:48:24,181]: Start XmlHttpRequest
          debug[22:48:24,181]: Reqest state : 1
          debug[22:48:24,181]: QueryString: debug[22:48:24,196]: Reqest state : 1
          debug[22:48:24,462]: Reqest state : 2
          debug[22:48:24,462]: Reqest state : 3
          debug[22:48:24,462]: Reqest state : 4
          debug[22:48:24,462]: Reqest end with state 4
          debug[22:48:24,462]: <skipped>
          debug[22:48:24,462]: Header Ajax-Expired not found, search in <meta>
          debug[22:48:24,462]: search for elements by name 'meta' in element #document
          debug[22:48:24,462]: getElementsByTagName found 2
          debug[22:48:24,462]: Find <meta name='Ajax-Update-Ids' content='j_id12:resourceAdditionAttemptMessages,j_id12:bookingResourceAttemptMessages,j_id8'>
          debug[22:48:24,462]: Find <meta name='Ajax-Response' content='true'>
          debug[22:48:24,462]: Header Ajax-Update-Ids not found, search in <meta>
          debug[22:48:24,462]: search for elements by name 'meta' in element #document
          debug[22:48:24,477]: getElementsByTagName found 2
          debug[22:48:24,477]: Find <meta name='Ajax-Update-Ids' content='j_id12:resourceAdditionAttemptMessages,j_id12:bookingResourceAttemptMessages,j_id8'>
          debug[22:48:24,477]: Update page by list of rendered areas from response j_id12:resourceAdditionAttemptMessages,j_id12:bookingResourceAttemptMessages,j_id8
          debug[22:48:24,477]: search for elements by name 'script' in element #document
          debug[22:48:24,477]: getElementsByTagName found 7
          debug[22:48:24,477]: <script> in response with src=/site/a4j_3_1_2.GAorg.ajax4jsf.javascript.AjaxScript
          debug[22:48:24,477]: Such element exist in document
          debug[22:48:24,477]: <script> in response with src=/site/a4j_3_1_2.GAorg/ajax4jsf/javascript/scripts/form.js
          debug[22:48:24,477]: Such element exist in document
          debug[22:48:24,477]: <script> in response with src=/site/a4j_3_1_2.GAorg.ajax4jsf.javascript.PrototypeScript
          debug[22:48:24,477]: Such element exist in document
          debug[22:48:24,477]: <script> in response with src=/site/a4j_3_1_2.GAscript/SpinnerScript.js
          debug[22:48:24,477]: Such element exist in document
          debug[22:48:24,477]: <script> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/browser_info.js
          debug[22:48:24,477]: Such element exist in document
          debug[22:48:24,477]: <script> in response with src=/site/a4j_3_1_2.GAscripts/scriptaculous/effects.js
          debug[22:48:24,477]: Such element exist in document
          debug[22:48:24,477]: <script> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/script/processEffect.js
          debug[22:48:24,477]: Such element exist in document
          debug[22:48:24,477]: search for elements by name 'link' in element #document
          debug[22:48:24,493]: getElementsByTagName found 5
          debug[22:48:24,493]: <link> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/css/msg.css
          debug[22:48:24,493]: Such element exist in document
          debug[22:48:24,493]: <link> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/css/msgs.css
          debug[22:48:24,493]: Such element exist in document
          debug[22:48:24,493]: <link> in response with src=/site/a4j_3_1_2.GAcss/panel.xcss/DATB/eAEz3vGhHwAFZwJr
          debug[22:48:24,493]: Such element exist in document
          debug[22:48:24,493]: <link> in response with src=/site/a4j_3_1_2.GAcss/spinner.xcss/DATB/eAEz3vGhHwAFZwJr
          debug[22:48:24,493]: Such element exist in document
          debug[22:48:24,493]: <link> in response with src=/site/a4j_3_1_2.GAcss/table.xcss/DATB/eAEz3vGhHwAFZwJr
          debug[22:48:24,493]: Such element exist in document
          debug[22:48:24,493]: Attempt to update part of page for Id: j_id12:resourceAdditionAttemptMessages
          debug[22:48:24,493]: call getElementById for id= j_id12:resourceAdditionAttemptMessages
          debug[22:48:24,493]: Replace content of node by replaceChild()
          debug[22:48:24,493]: search for elements by name 'script' in element dl
          debug[22:48:24,509]: getElementsByTagName found 0
          debug[22:48:24,509]: Scripts in updated part count : 0
          debug[22:48:24,509]: Update part of page for Id: j_id12:resourceAdditionAttemptMessages successful
          debug[22:48:24,509]: Attempt to update part of page for Id: j_id12:bookingResourceAttemptMessages
          debug[22:48:24,509]: call getElementById for id= j_id12:bookingResourceAttemptMessages
          debug[22:48:24,509]: Replace content of node by replaceChild()
          debug[22:48:24,509]: search for elements by name 'script' in element span
          debug[22:48:24,509]: getElementsByTagName found 0
          debug[22:48:24,509]: Scripts in updated part count : 0
          debug[22:48:24,509]: Update part of page for Id: j_id12:bookingResourceAttemptMessages successful
          debug[22:48:24,509]: Attempt to update part of page for Id: j_id8
          debug[22:48:24,509]: call getElementById for id= j_id8
          debug[22:48:24,509]: Replace content of node by replaceChild()
          debug[22:48:24,509]: search for elements by name 'script' in element table
          debug[22:48:24,524]: getElementsByTagName found 0
          debug[22:48:24,524]: Scripts in updated part count : 0
          debug[22:48:24,524]: Update part of page for Id: j_id8 successful
          debug[22:48:24,524]: call getElementById for id= ajax-view-state
          debug[22:48:24,524]: Hidden JSF state fields: [object HTMLSpanElement]
          debug[22:48:24,524]: Namespace for hidden view-state input fields is undefined
          debug[22:48:24,524]: search for elements by name 'input' in element span
          debug[22:48:24,524]: getElementsByTagName found 1
          debug[22:48:24,524]: Replace value for inputs: 20 by new values: 1
          debug[22:48:24,524]: Input in response: javax.faces.ViewState
          debug[22:48:24,524]: Found same input on page with type: hidden
          debug[22:48:24,524]: search for elements by name 'INPUT' in element span
          debug[22:48:24,524]: getElementsByTagName found 0
          debug[22:48:24,524]: Replace value for inputs: 20 by new values: 0
          debug[22:48:24,524]: call getElementById for id= _A4J.AJAX.focus
          debug[22:48:24,524]: No focus information in response
          debug[22:48:24,524]: call getElementById for id= org.ajax4jsf.oncomplete
          


          • 2. Re: rendered=
            Tony Herstell Master

            and going upwards

            debug[22:53:02,212]: Event occurs, create waiting for request in queue eventsQueue
            debug[22:53:02,712]: End delay waiting, make request in queue eventsQueue
            debug[22:53:02,712]: NEW AJAX REQUEST !!! with form :j_id12
            debug[22:53:02,712]: Append text control j_id12:nightBeforeStableNumbers with value [1] and value attribute [0]
            debug[22:53:02,712]: Append text control j_id12:nightBeforeYardNumbers with value [0] and value attribute [0]
            debug[22:53:02,712]: Append hidden control j_id12 with value [j_id12] and value attribute [j_id12]
            debug[22:53:02,712]: Append hidden control autoScroll with value [] and value attribute []
            debug[22:53:02,712]: Append hidden control j_id12:_idcl with value [] and value attribute []
            debug[22:53:02,712]: Append hidden control j_id12:_link_hidden_ with value [] and value attribute []
            debug[22:53:02,712]: Append hidden control javax.faces.ViewState with value [_id43] and value attribute [_id43]
            debug[22:53:02,712]: parameter j_id12:j_id95 with value j_id12:j_id95
            debug[22:53:02,712]: Start XmlHttpRequest
            debug[22:53:02,712]: Reqest state : 1
            debug[22:53:02,712]: QueryString: AJAXREQUEST=_viewRoot&j_id12%3Abooking_reason_selection=ONE_HOUR_PRIVATE&j_id12
            %3AnightBeforeStableNumbers=1&j_id12%3AnightBeforeYardNumbers=0
            &j_id12=j_id12&autoScroll=&j_id12%3A_idcl=&j_id12%3A_link_hidden_=&j
            avax.faces.ViewState=_id43&j_id12%3Aj_id95=j_id12%3Aj_id95&
            debug[22:53:02,727]: Reqest state : 1
            debug[22:53:03,009]: Reqest state : 2
            debug[22:53:03,009]: Reqest state : 3
            debug[22:53:03,009]: Reqest state : 4
            debug[22:53:03,009]: Reqest end with state 4
            debug[22:53:03,009]: <skipped>
            debug[22:53:03,009]: Header Ajax-Expired not found, search in <meta>
            debug[22:53:03,009]: search for elements by name 'meta' in element #document
            debug[22:53:03,009]: getElementsByTagName found 2
            debug[22:53:03,009]: Find <meta name='Ajax-Update-Ids' content='j_id12:resourcesAddedTotal,j_id12:resourceAdditionAttemptMessages,j_id12:bookingResourceAttemptMessages,j_id8'>
            debug[22:53:03,009]: Find <meta name='Ajax-Response' content='true'>
            debug[22:53:03,009]: Header Ajax-Update-Ids not found, search in <meta>
            debug[22:53:03,024]: search for elements by name 'meta' in element #document
            debug[22:53:03,024]: getElementsByTagName found 2
            debug[22:53:03,024]: Find <meta name='Ajax-Update-Ids' content='j_id12:resourcesAddedTotal,j_id12:resourceAdditionAttemptMessages,j_id12:bookingResourceAttemptMessages,j_id8'>
            debug[22:53:03,024]: Update page by list of rendered areas from response j_id12:resourcesAddedTotal,j_id12:resourceAdditionAttemptMessages,j_id12:bookingResourceAttemptMessages,j_id8
            debug[22:53:03,024]: search for elements by name 'script' in element #document
            debug[22:53:03,024]: getElementsByTagName found 7
            debug[22:53:03,024]: <script> in response with src=/site/a4j_3_1_2.GAorg.ajax4jsf.javascript.AjaxScript
            debug[22:53:03,024]: Such element exist in document
            debug[22:53:03,024]: <script> in response with src=/site/a4j_3_1_2.GAorg/ajax4jsf/javascript/scripts/form.js
            debug[22:53:03,024]: Such element exist in document
            debug[22:53:03,024]: <script> in response with src=/site/a4j_3_1_2.GAorg.ajax4jsf.javascript.PrototypeScript
            debug[22:53:03,024]: Such element exist in document
            debug[22:53:03,024]: <script> in response with src=/site/a4j_3_1_2.GAscript/SpinnerScript.js
            debug[22:53:03,024]: Such element exist in document
            debug[22:53:03,024]: <script> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/browser_info.js
            debug[22:53:03,024]: Such element exist in document
            debug[22:53:03,040]: <script> in response with src=/site/a4j_3_1_2.GAscripts/scriptaculous/effects.js
            debug[22:53:03,040]: Such element exist in document
            debug[22:53:03,040]: <script> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/script/processEffect.js
            debug[22:53:03,040]: Such element exist in document
            debug[22:53:03,040]: search for elements by name 'link' in element #document
            debug[22:53:03,040]: getElementsByTagName found 5
            debug[22:53:03,040]: <link> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/css/msg.css
            debug[22:53:03,040]: Such element exist in document
            debug[22:53:03,040]: <link> in response with src=/site/a4j_3_1_2.GAorg/richfaces/renderkit/html/css/msgs.css
            debug[22:53:03,040]: Such element exist in document
            debug[22:53:03,040]: <link> in response with src=/site/a4j_3_1_2.GAcss/panel.xcss/DATB/eAEz3vGhHwAFZwJr
            debug[22:53:03,040]: Such element exist in document
            debug[22:53:03,040]: <link> in response with src=/site/a4j_3_1_2.GAcss/spinner.xcss/DATB/eAEz3vGhHwAFZwJr
            debug[22:53:03,040]: Such element exist in document
            debug[22:53:03,040]: <link> in response with src=/site/a4j_3_1_2.GAcss/table.xcss/DATB/eAEz3vGhHwAFZwJr
            debug[22:53:03,040]: Such element exist in document
            debug[22:53:03,040]: Attempt to update part of page for Id: j_id12:resourcesAddedTotal
            debug[22:53:03,040]: call getElementById for id= j_id12:resourcesAddedTotal
            debug[22:53:03,040]: Replace content of node by replaceChild()
            debug[22:53:03,040]: search for elements by name 'script' in element span
            debug[22:53:03,056]: getElementsByTagName found 0
            debug[22:53:03,056]: Scripts in updated part count : 0
            debug[22:53:03,056]: Update part of page for Id: j_id12:resourcesAddedTotal successful
            debug[22:53:03,056]: Attempt to update part of page for Id: j_id12:resourceAdditionAttemptMessages
            debug[22:53:03,056]: call getElementById for id= j_id12:resourceAdditionAttemptMessages
            debug[22:53:03,056]: Replace content of node by replaceChild()
            debug[22:53:03,056]: search for elements by name 'script' in element dl
            debug[22:53:03,056]: getElementsByTagName found 0
            debug[22:53:03,056]: Scripts in updated part count : 0
            debug[22:53:03,056]: Update part of page for Id: j_id12:resourceAdditionAttemptMessages successful
            debug[22:53:03,056]: Attempt to update part of page for Id: j_id12:bookingResourceAttemptMessages
            debug[22:53:03,056]: call getElementById for id= j_id12:bookingResourceAttemptMessages
            debug[22:53:03,056]: Replace content of node by replaceChild()
            debug[22:53:03,071]: search for elements by name 'script' in element span
            debug[22:53:03,071]: getElementsByTagName found 0
            debug[22:53:03,071]: Scripts in updated part count : 0
            debug[22:53:03,071]: Update part of page for Id: j_id12:bookingResourceAttemptMessages successful
            debug[22:53:03,071]: Attempt to update part of page for Id: j_id8
            debug[22:53:03,071]: call getElementById for id= j_id8
            debug[22:53:03,071]: Replace content of node by replaceChild()
            debug[22:53:03,071]: search for elements by name 'script' in element table
            debug[22:53:03,071]: getElementsByTagName found 0
            debug[22:53:03,071]: Scripts in updated part count : 0
            debug[22:53:03,071]: Update part of page for Id: j_id8 successful
            debug[22:53:03,071]: call getElementById for id= ajax-view-state
            debug[22:53:03,071]: Hidden JSF state fields: [object HTMLSpanElement]
            debug[22:53:03,071]: Namespace for hidden view-state input fields is undefined
            debug[22:53:03,087]: search for elements by name 'input' in element span
            debug[22:53:03,087]: getElementsByTagName found 1
            debug[22:53:03,087]: Replace value for inputs: 20 by new values: 1
            debug[22:53:03,087]: Input in response: javax.faces.ViewState
            debug[22:53:03,087]: Found same input on page with type: hidden
            debug[22:53:03,087]: search for elements by name 'INPUT' in element span
            debug[22:53:03,087]: getElementsByTagName found 0
            debug[22:53:03,087]: Replace value for inputs: 20 by new values: 0
            debug[22:53:03,087]: call getElementById for id= _A4J.AJAX.focus
            debug[22:53:03,087]: No focus information in response
            debug[22:53:03,087]: call getElementById for id= org.ajax4jsf.oncomplete
            


            • 3. Re: rendered=
              Tony Herstell Master

              resourceAddedTotal is only on the "up" log?

              • 4. Re: rendered=
                Tony Herstell Master

                 

                <rich:inputNumberSpinner id="nightBeforeStableNumbers" immediate="true"
                 enableManualInput="false" minValue="0" maxValue="25" step="1"
                 value="#{bookingController.nightBeforeStableNumbers}">
                 <a4j:support event="onchange" LimitToList="true"
                 reRender="resourcesAddedTotal" eventsQueue="eventsQueue" requestDelay="500"/>
                </rich:inputNumberSpinner>
                


                • 5. Re: rendered=
                  Sergey Smirnov Master

                  tony, why you post all this stuff? I did not get the point.

                  • 6. Re: rendered=
                    Tony Herstell Master

                    Hi Sergey.

                    Was posting as much information as possible to see if you can spot the bug as I can't.

                    I guess it didn't help then.

                    Odd little bug...

                    • 7. Re: rendered=
                      Sergey Smirnov Master

                      I do not see any bug yet.