Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-856

Investigate using CDI for implementing Pagination support

    XMLWordPrintable

Details

    • Task
    • Resolution: Obsolete
    • Major
    • 1.0.0.M8, 1.0.0.CR1
    • 1.0.0.M8
    • controller
    • None

    Description

      The following description was given in the dev-list thread (see "Forum Reference):

      So what about injecting pagination info via CDI?
      This means that we'll need to use instance variables on the Controller class, and decorate it during instantiation. The paging support could be enabled by using an annotation on the controller method (@Paginated), and the CDI extension would take care of wrapping the response/putting the headers accordingly.

      public class Cars {
      
        private PaginationInfo paginationInfo;
      
        @Paginated
        public List<Car> list() {
            // fetch offset/limit from this.paginationInfo
        }
      }
      

      The response would be decorated with the appropriate links.

      Attachments

        Activity

          People

            boliveir_managed_kafka_security (inactive user) Bruno Oliveira Silva (Inactive)
            dbeveniu Daniel Bevenius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: