You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by AMIR-TAHMASSEB Marc Kamran <ma...@ombudsman.europa.eu> on 2007/06/20 14:53:20 UTC

Re: DataScroller - current page?

albartell <albartell <at> gmail.com> writes:

> 
> >Hope this helps you figure out what to focus on though. 
> 
> Thanks for your response.  This gives me refined direction.
> 
> >I don't have any solutions for you, since I always load the full data set
> into the table.
> This is also the approach I have taken, but that isn't an option anymore as
> memory has become an issue.
> 
> Has anybody else had success in positioning to the middle of an SQL result
> set and appropriately conveying that in the datascroller tag?
> 
> >> My version of MyFaces is 1.0.7
> >>
> >This really isn't supported anymore.
> 
> If a newer version had the capabilities I need then I could justify the
> upgrade, but until then I cannot 
> 
> Aaron Bartell
> http://mowyourlawn.com

Dear Albartell,

I have also the same problem : I can not load the full data set into my table.

Do you found any solution to your problem ? I would be interested to have it !

regards

Marc




RE: DataScroller - current page?

Posted by AMIR-TAHMASSEB Marc <ma...@ombudsman.europa.eu>.
Dear Andrew,

thank you for your response.

I upgraded to Tomahawk 1.1.6 and now everything goes well...

regards

Marc

Marc Kamran AMIR-TAHMASSEB
European Ombudsman Office
+33.3.88.1.74.410 - SDM G07047
 

>-----Original Message-----
>From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com] 
>Sent: 20 June 2007 17:26
>To: MyFaces Discussion
>Subject: Re: DataScroller - current page?
>
>Besides the fact you are using a way outdated version, there should be
>no reason you can't just show part of the results, I do it all the
>time in our application. You just have to build a custom DataModel
>class. Just extend DataModel.
>
>Tips:
>
>public int getRowCount:
>Return the total number of rows, not the number you have loaded
>
>public Object getRowData:
>Return from your local subset of results, the current data table row
>index minus the "Start at". Where "start at" is the current data model
>page (if on page 5 and showing 20 rows, start at would be 100)
>
>public boolean isRowAvailable:
>Return if the row index is >= the start at and the row index is less
>than the current number of items loaded.
>
>You can load the data when the "setRowIndex" is called by the renderer.
>
>You may need to extend the data table to get the notification when the
>"first" attribute is set  if you don't upgrade to the current version
>of 1.1.6 tomahawk. The reason is that the old HtmlDataScroller in the
>setFirst method only set the UIData's local variable, the new code
>actually uses the ValueBinding to set the first (and thus you can
>update your DataModel's start at property)
>
>
>
>On 6/20/07, AMIR-TAHMASSEB Marc Kamran
><ma...@ombudsman.europa.eu> wrote:
>>
>> albartell <albartell <at> gmail.com> writes:
>>
>> >
>> > >Hope this helps you figure out what to focus on though.
>> >
>> > Thanks for your response.  This gives me refined direction.
>> >
>> > >I don't have any solutions for you, since I always load 
>the full data set
>> > into the table.
>> > This is also the approach I have taken, but that isn't an 
>option anymore as
>> > memory has become an issue.
>> >
>> > Has anybody else had success in positioning to the middle 
>of an SQL result
>> > set and appropriately conveying that in the datascroller tag?
>> >
>> > >> My version of MyFaces is 1.0.7
>> > >>
>> > >This really isn't supported anymore.
>> >
>> > If a newer version had the capabilities I need then I 
>could justify the
>> > upgrade, but until then I cannot
>> >
>> > Aaron Bartell
>> > http://mowyourlawn.com
>>
>> Dear Albartell,
>>
>> I have also the same problem : I can not load the full data 
>set into my table.
>>
>> Do you found any solution to your problem ? I would be 
>interested to have it !
>>
>> regards
>>
>> Marc
>>
>>
>>
>>
>

Re: DataScroller - current page?

Posted by Andrew Robinson <an...@gmail.com>.
Besides the fact you are using a way outdated version, there should be
no reason you can't just show part of the results, I do it all the
time in our application. You just have to build a custom DataModel
class. Just extend DataModel.

Tips:

public int getRowCount:
Return the total number of rows, not the number you have loaded

public Object getRowData:
Return from your local subset of results, the current data table row
index minus the "Start at". Where "start at" is the current data model
page (if on page 5 and showing 20 rows, start at would be 100)

public boolean isRowAvailable:
Return if the row index is >= the start at and the row index is less
than the current number of items loaded.

You can load the data when the "setRowIndex" is called by the renderer.

You may need to extend the data table to get the notification when the
"first" attribute is set  if you don't upgrade to the current version
of 1.1.6 tomahawk. The reason is that the old HtmlDataScroller in the
setFirst method only set the UIData's local variable, the new code
actually uses the ValueBinding to set the first (and thus you can
update your DataModel's start at property)



On 6/20/07, AMIR-TAHMASSEB Marc Kamran
<ma...@ombudsman.europa.eu> wrote:
>
> albartell <albartell <at> gmail.com> writes:
>
> >
> > >Hope this helps you figure out what to focus on though.
> >
> > Thanks for your response.  This gives me refined direction.
> >
> > >I don't have any solutions for you, since I always load the full data set
> > into the table.
> > This is also the approach I have taken, but that isn't an option anymore as
> > memory has become an issue.
> >
> > Has anybody else had success in positioning to the middle of an SQL result
> > set and appropriately conveying that in the datascroller tag?
> >
> > >> My version of MyFaces is 1.0.7
> > >>
> > >This really isn't supported anymore.
> >
> > If a newer version had the capabilities I need then I could justify the
> > upgrade, but until then I cannot
> >
> > Aaron Bartell
> > http://mowyourlawn.com
>
> Dear Albartell,
>
> I have also the same problem : I can not load the full data set into my table.
>
> Do you found any solution to your problem ? I would be interested to have it !
>
> regards
>
> Marc
>
>
>
>