Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4905

PagingNavigation: possible to call setStartIndex() earlier than onBeforeRender?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.2.0
    • 6.13.0, 7.0.0-M1
    • wicket

    Description

      PagingNavigation has two actions in its onBeforeRender implementation:

      setDefaultModel(new Model<Integer>((int)Math.max(Integer.MAX_VALUE, pageable.getPageCount())));
      setStartIndex();

      Building my own PagingNavigation extending PagingNavigation, not being able to retrieve the start index before onBeforeRender, forces me to put a lot of logical code into my own onBeforeRender implementation.
      So there's a valid workaround, but I'd expect this to work from onConfigure also, maybe even from onInitialize.

      As far as I can see it should be possible to call the two methods earlier than onBeforeRender, however I might be missing the "big picture" and oversee some side effects this could cause.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            pparson Peter Parson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: