pseudo-pagination for subsets of data compiled by hand

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pseudo-pagination for subsets of data compiled by hand

Leon Torres-2
Hi folks,

Is there a way to make the form widget pagination think there is a list of size
1000 when we actually pass it a list of size 20 which is a subset of the 1000 items?

I have 1000 products and my VIEW_SIZE is 20.  In my script, I get the 20 values
from the database according to VIEW_INDEX, then compose a complicated report for
those 20 items.  Then I pass this list of 20 to the form widget.  The form
widget thinks the total list size is 20, so it won't do pagination.

Anyone know a solution to this?  (I tried using the 20 items padded with empty
objects to make a list of size 1000, but this hackery is ugly.)

- Leon
Reply | Threaded
Open this post in threaded view
|

Re: pseudo-pagination for subsets of data compiled by hand

Leon Torres-2
I found that the form widget was not able to do this, however it was easy to
modify it to handle this case.  I created an issue to address this,

http://issues.apache.org/jira/browse/OFBIZ-364

I think this is a very important improvement, because without it, pagination can
only be applied to reports that are entirely contained in a <view-entity>.  This
improvement will allow more sophisticated reports to be constructed by hand out
of a subset of the list, say from multiple view entities (my current project).

- Leon



Leon Torres wrote:

> Hi folks,
>
> Is there a way to make the form widget pagination think there is a list
> of size 1000 when we actually pass it a list of size 20 which is a
> subset of the 1000 items?
>
> I have 1000 products and my VIEW_SIZE is 20.  In my script, I get the 20
> values from the database according to VIEW_INDEX, then compose a
> complicated report for those 20 items.  Then I pass this list of 20 to
> the form widget.  The form widget thinks the total list size is 20, so
> it won't do pagination.
>
> Anyone know a solution to this?  (I tried using the 20 items padded with
> empty objects to make a list of size 1000, but this hackery is ugly.)
>
> - Leon
>