You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Ilmar Ferreira <il...@gmail.com> on 2022/03/11 00:49:04 UTC

Table pagination

Hi everyone,

first of all congratulations on the amazing work on Apache ISIS (I`ve been
looking for something like this for a long time).

So is there any way to do pagination on the server-side for a collection is
returned from an action?

It would be great if we had a way to pass the pagination parameters
straight to the action method so we can use them on the JPA queries and we
would not need to read the entire table using findAll.

If this is not supported by the framework yet is there any way to customize
it?

Thanks.
-- 
Sincerely,

*Ilmar Marques*
Full stack developer & Data scientist
+14379716971 | ilmar.ferreira@gmail.com |
Skype: ilmar.ferreira.marques <https://webapp.wisestamp.com/#>
<http://www.facebook.com/ilmar.ferreira>
<https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
<https://www.linkedin.com/in/ilmarmarques/?locale=en_US>

Re: Table pagination

Posted by Andi Huber <ah...@apache.org>.
I agree server-side pagination would be a nice feature to have.

I'm afraid I don't have an immediate answer here, as I don't know how hard it would be to implement. All I can do for now is to track this as a Jira task:

https://issues.apache.org/jira/browse/ISIS-2972

We are in the final iteration step towards a Apache Isis version 2 release. Hard to tell whether we can patch this in or not.

Cheers Andi

On 2022/03/13 13:44:13 Dan Haywood wrote:
> Hi Ilmar,
> 
> Thanks for your kind words, glad you've found us.
> 
> As I think you probably surmise, there is not currently any way to do
> server-side pagination.  To support it would require a new version of the
> collection component that somehow had knowledge about the action to be used
> to generate its contents, which is StandaloneCollectionPanelFactory.
> 
> We do have docs on how to write a new component [1] and I would suggest
> starting off with the existing component (look for classes that inherit
> `ComponentFactory`).  Probably StandaloneCollectionPanelFactory is the one
> to look into; it creates a StandaloneCollectionPanel which is the actual
> component.
> 
> Looking at the code now, though, I suspect that the model that this
> component is given already has the collection objects, and moreover doesn't
> have direct knowledge of the action that was used to obtain them.  So it's
> not clear to me if we can support the use case without some refactoring in
> this area.
> 
> I'll ask Andi (our most active committer currently) to respond on this, but
> if you want me to invite you to our slack channel where you can get more
> immediate answers, I'd be very happy to do that.
> 
> Thanks
> Dan
> 
> 
> 
> 
> 
> 
> [1]
> https://isis.apache.org/vw/2.0.0-M7/extending.html#replacing-page-elements
> 
> On Fri, 11 Mar 2022 at 00:49, Ilmar Ferreira <il...@gmail.com>
> wrote:
> 
> > Hi everyone,
> >
> > first of all congratulations on the amazing work on Apache ISIS (I`ve been
> > looking for something like this for a long time).
> >
> > So is there any way to do pagination on the server-side for a collection is
> > returned from an action?
> >
> > It would be great if we had a way to pass the pagination parameters
> > straight to the action method so we can use them on the JPA queries and we
> > would not need to read the entire table using findAll.
> >
> > If this is not supported by the framework yet is there any way to customize
> > it?
> >
> > Thanks.
> > --
> > Sincerely,
> >
> > *Ilmar Marques*
> > Full stack developer & Data scientist
> > +14379716971 | ilmar.ferreira@gmail.com |
> > Skype: ilmar.ferreira.marques <https://webapp.wisestamp.com/#>
> > <http://www.facebook.com/ilmar.ferreira>
> > <https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
> > <https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
> >
> 

Re: Table pagination

Posted by Ilmar Ferreira <il...@gmail.com>.
Hi Dan,

thanks for getting back to me regarding this question. Yeah, it would be
awesome if you added me to the Slack channel so the communication would be
faster.

Thanks a ton.

On Sun, Mar 13, 2022 at 9:44 AM Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi Ilmar,
>
> Thanks for your kind words, glad you've found us.
>
> As I think you probably surmise, there is not currently any way to do
> server-side pagination.  To support it would require a new version of the
> collection component that somehow had knowledge about the action to be used
> to generate its contents, which is StandaloneCollectionPanelFactory.
>
> We do have docs on how to write a new component [1] and I would suggest
> starting off with the existing component (look for classes that inherit
> `ComponentFactory`).  Probably StandaloneCollectionPanelFactory is the one
> to look into; it creates a StandaloneCollectionPanel which is the actual
> component.
>
> Looking at the code now, though, I suspect that the model that this
> component is given already has the collection objects, and moreover doesn't
> have direct knowledge of the action that was used to obtain them.  So it's
> not clear to me if we can support the use case without some refactoring in
> this area.
>
> I'll ask Andi (our most active committer currently) to respond on this, but
> if you want me to invite you to our slack channel where you can get more
> immediate answers, I'd be very happy to do that.
>
> Thanks
> Dan
>
>
>
>
>
>
> [1]
> https://isis.apache.org/vw/2.0.0-M7/extending.html#replacing-page-elements
>
> On Fri, 11 Mar 2022 at 00:49, Ilmar Ferreira <il...@gmail.com>
> wrote:
>
> > Hi everyone,
> >
> > first of all congratulations on the amazing work on Apache ISIS (I`ve
> been
> > looking for something like this for a long time).
> >
> > So is there any way to do pagination on the server-side for a collection
> is
> > returned from an action?
> >
> > It would be great if we had a way to pass the pagination parameters
> > straight to the action method so we can use them on the JPA queries and
> we
> > would not need to read the entire table using findAll.
> >
> > If this is not supported by the framework yet is there any way to
> customize
> > it?
> >
> > Thanks.
> > --
> > Sincerely,
> >
> > *Ilmar Marques*
> > Full stack developer & Data scientist
> > +14379716971 | ilmar.ferreira@gmail.com |
> > Skype: ilmar.ferreira.marques <https://webapp.wisestamp.com/#>
> > <http://www.facebook.com/ilmar.ferreira>
> > <https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
> > <https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
> >
>


-- 
Sincerely,

*Ilmar Marques*
Full stack developer & Data scientist
+14379716971 | ilmar.ferreira@gmail.com |
Skype: ilmar.ferreira.marques <https://webapp.wisestamp.com/#>
<http://www.facebook.com/ilmar.ferreira>
<https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
<https://www.linkedin.com/in/ilmarmarques/?locale=en_US>

Re: Table pagination

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Ilmar,

Thanks for your kind words, glad you've found us.

As I think you probably surmise, there is not currently any way to do
server-side pagination.  To support it would require a new version of the
collection component that somehow had knowledge about the action to be used
to generate its contents, which is StandaloneCollectionPanelFactory.

We do have docs on how to write a new component [1] and I would suggest
starting off with the existing component (look for classes that inherit
`ComponentFactory`).  Probably StandaloneCollectionPanelFactory is the one
to look into; it creates a StandaloneCollectionPanel which is the actual
component.

Looking at the code now, though, I suspect that the model that this
component is given already has the collection objects, and moreover doesn't
have direct knowledge of the action that was used to obtain them.  So it's
not clear to me if we can support the use case without some refactoring in
this area.

I'll ask Andi (our most active committer currently) to respond on this, but
if you want me to invite you to our slack channel where you can get more
immediate answers, I'd be very happy to do that.

Thanks
Dan






[1]
https://isis.apache.org/vw/2.0.0-M7/extending.html#replacing-page-elements

On Fri, 11 Mar 2022 at 00:49, Ilmar Ferreira <il...@gmail.com>
wrote:

> Hi everyone,
>
> first of all congratulations on the amazing work on Apache ISIS (I`ve been
> looking for something like this for a long time).
>
> So is there any way to do pagination on the server-side for a collection is
> returned from an action?
>
> It would be great if we had a way to pass the pagination parameters
> straight to the action method so we can use them on the JPA queries and we
> would not need to read the entire table using findAll.
>
> If this is not supported by the framework yet is there any way to customize
> it?
>
> Thanks.
> --
> Sincerely,
>
> *Ilmar Marques*
> Full stack developer & Data scientist
> +14379716971 | ilmar.ferreira@gmail.com |
> Skype: ilmar.ferreira.marques <https://webapp.wisestamp.com/#>
> <http://www.facebook.com/ilmar.ferreira>
> <https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
> <https://www.linkedin.com/in/ilmarmarques/?locale=en_US>
>