Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What is the way to implement data paging using EJB methods (and tables in particular)

Ian RApr 6 2017 — edited Apr 7 2017

Hi,

I was wondering how to implement data paging using a component like af:table but using an EJB data control.

I know how to create the data control for my EJB but I'm not sure what the signature of the method should be so I can:

  • Only fetch part of the data (I can do this inside the method when I do my JPA query)
  • How to bind this fetching to a component like af:table

Are there methods/callbacks I'll need to implement on the view side to do this when a page is clicked? Or can I use a particular method signature on the EJB and it will automatically happen?

One method signature which was automatically generated was  Object queryByRange(String jpqlStmt, int firstResult, int maxResults); But I'm not sure if this will automatically bind.

I hope my question is clear enough - let me know if it isn't.

Thanks,

Ian

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2017
Added on Apr 6 2017
1 comment
297 views