You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2006/07/25 18:13:00 UTC

tomahawk DataScroller - getUIData.setFirst(0) problem

I want to do some fixes on the dataScroller - but i've got a problem.

I am setting the firstRow in getFirstRow - which is the value that
decides which is the first row to be rendered, is it? - to 0 in certain
cases.
According to debug output - getUIData.getFirst() is set to 0 - but the
table which is child of the scroller still shows from the last position,
instead of 0.

If i use getUIData.setFirst(0) it works everytime - but  than the
scroller is broken.
If i use getUIData.setFirst(myvariable) and this one is set to 0 - i
doesnt work ... mysterious?

Any hints whats wrong here?

kind regards


Re: tomahawk DataScroller - getUIData.setFirst(0) problem

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Question:

In Phase 2 the value is still the old one ( of cause ) - i change the
value in Phase 6 - is that too late?
In which phase i have to set the _first to make sure the dataTable is
using this one? 

kind regards

Am Donnerstag, den 27.07.2006, 12:10 +0200 schrieb Torsten Krah:
> See it - after _fist in UIData is set - its returned instead of the
> value binding.
> I wonder why setFirst does not work ( sometimes it does in certain
> cases, sometimes it wont work ... really mysterious ) - maybe i call it
> too late ... don't know, i am afraid i have to debug it more as i
> wanted.
> 
> I don't want to subclass the table because, i only want to fix this
> scoller bug. I thing it have to be solved without making such "changes"
> to other classes, but i'll try it for testing purposes.
> 
> kind regards
> 
> Am Dienstag, den 25.07.2006, 11:00 -0600 schrieb Andrew Robinson:
> > In the code, the data scroller just calls get first and set first. It
> > only uses value binding (EL) the first time. Once you navigate using
> > the data scroller, it uses a variable that is saved to the UI data
> > state, so the EL will never be evaluated again. I am not sure why
> > setting the first of the UI data isn't working though, it should. If
> > you want the UI data to always use EL, you will have to subclass the
> > data table and when set first is called, update the value binding
> > value instead of setting the local integer value.
> > 
> > On 7/25/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> > > I want to do some fixes on the dataScroller - but i've got a problem.
> > >
> > > I am setting the firstRow in getFirstRow - which is the value that
> > > decides which is the first row to be rendered, is it? - to 0 in certain
> > > cases.
> > > According to debug output - getUIData.getFirst() is set to 0 - but the
> > > table which is child of the scroller still shows from the last position,
> > > instead of 0.
> > >
> > > If i use getUIData.setFirst(0) it works everytime - but  than the
> > > scroller is broken.
> > > If i use getUIData.setFirst(myvariable) and this one is set to 0 - i
> > > doesnt work ... mysterious?
> > >
> > > Any hints whats wrong here?
> > >
> > > kind regards
> > >
> > >
> 


Re: tomahawk DataScroller - getUIData.setFirst(0) problem

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
See it - after _fist in UIData is set - its returned instead of the
value binding.
I wonder why setFirst does not work ( sometimes it does in certain
cases, sometimes it wont work ... really mysterious ) - maybe i call it
too late ... don't know, i am afraid i have to debug it more as i
wanted.

I don't want to subclass the table because, i only want to fix this
scoller bug. I thing it have to be solved without making such "changes"
to other classes, but i'll try it for testing purposes.

kind regards

Am Dienstag, den 25.07.2006, 11:00 -0600 schrieb Andrew Robinson:
> In the code, the data scroller just calls get first and set first. It
> only uses value binding (EL) the first time. Once you navigate using
> the data scroller, it uses a variable that is saved to the UI data
> state, so the EL will never be evaluated again. I am not sure why
> setting the first of the UI data isn't working though, it should. If
> you want the UI data to always use EL, you will have to subclass the
> data table and when set first is called, update the value binding
> value instead of setting the local integer value.
> 
> On 7/25/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> > I want to do some fixes on the dataScroller - but i've got a problem.
> >
> > I am setting the firstRow in getFirstRow - which is the value that
> > decides which is the first row to be rendered, is it? - to 0 in certain
> > cases.
> > According to debug output - getUIData.getFirst() is set to 0 - but the
> > table which is child of the scroller still shows from the last position,
> > instead of 0.
> >
> > If i use getUIData.setFirst(0) it works everytime - but  than the
> > scroller is broken.
> > If i use getUIData.setFirst(myvariable) and this one is set to 0 - i
> > doesnt work ... mysterious?
> >
> > Any hints whats wrong here?
> >
> > kind regards
> >
> >


Re: tomahawk DataScroller - getUIData.setFirst(0) problem

Posted by Andrew Robinson <an...@gmail.com>.
In the code, the data scroller just calls get first and set first. It
only uses value binding (EL) the first time. Once you navigate using
the data scroller, it uses a variable that is saved to the UI data
state, so the EL will never be evaluated again. I am not sure why
setting the first of the UI data isn't working though, it should. If
you want the UI data to always use EL, you will have to subclass the
data table and when set first is called, update the value binding
value instead of setting the local integer value.

On 7/25/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> I want to do some fixes on the dataScroller - but i've got a problem.
>
> I am setting the firstRow in getFirstRow - which is the value that
> decides which is the first row to be rendered, is it? - to 0 in certain
> cases.
> According to debug output - getUIData.getFirst() is set to 0 - but the
> table which is child of the scroller still shows from the last position,
> instead of 0.
>
> If i use getUIData.setFirst(0) it works everytime - but  than the
> scroller is broken.
> If i use getUIData.setFirst(myvariable) and this one is set to 0 - i
> doesnt work ... mysterious?
>
> Any hints whats wrong here?
>
> kind regards
>
>