5 Replies Latest reply on Oct 16, 2007 7:51 PM by bfayle

    Datascroller bug

    bfayle

      There is a serious bug with the Datascroller component that I am surprised no one has reported before.

      When you click on the datascroller and cause a scroll event the update phase executes but does not actually update the model. The submitted value on all UIInput components should be null after the update phase is completed but when executing the lifecycle for a datascroller component this does not happen.

      It doesn't matter whether the bypassUpdates attribute is set to true or false, the datascroller never updates the model.

      Changes to the model made during the a scroll listener event are not rendered since the submitted values of the components on the page are not cleared.

      Why has this issue not been reported in the past?

        • 1. Re: Datascroller bug
          ilya_shaikovsky

          set ajaxSingle to true. It's false by default.

          • 2. Re: Datascroller bug
            bfayle

            That is not the solution. I don't want ajaxSingle set true, I want it false so the whole form is properly processed and validation and update of the model occur so that if there are errors these can be trapped and the invokeAction phase skipped to prevent scrolling when there are still errors on the page.

            THIS IS A BUG IN THE DATASCROLLER. IT NEVER UPDATES THE MODEL NO MATTER WHAT THE BypassUpdates FLAG IS SET TO!

            • 3. Re: Datascroller bug
              bfayle

              Okay I take that back - it's not a bug in the Datascroller - woohoo - very relieved - it's simply misunderstandings of what the default settings are in the documentation.

              In order to get the behaviour I wanted I neede to explicitly set both ajaxSingle="false" and bypassUpdates="false"

              Are you sure ajaxSingle is false by default?

              • 4. Re: Datascroller bug

                It is explicitly set to true in datascroller.

                http://anonsvn.jboss.org/repos/richfaces/branches/3.1.x/ui/datascroller/src/main/config/component/datascroller.xml


                Otherwise, the component will not work like expected if the form has other field that cause validation error.

                P.S.
                > Why has this issue not been reported in the past?

                was this a rhetorical question?

                • 5. Re: Datascroller bug
                  bfayle

                  Thanks for the source link.

                  There are times when I want ajaxSingle true and times when I want it false. One of the great features of RichFaces is the fine degree of control I get when combining this with regions.

                  My whole misunderstanding was due to not being aware of the default settings and making certain assumptions.

                  It is good to know where in the source to look for the defaults.

                  Thanks.