Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2297

Grid needs a context to properly participate in AJAX pages



    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.3, 5.4
    • None
    • tapestry-core


      This is a request to bring Grid into line with Form, EventLink, and ActionLink. They have a context parameter, which is very useful when in a component that is nested deeply in an AJAX page. In such situations, there may be no way to use the page's context to restore the component's parameters, ie. its context. The way out is to use the Form's, EventLink's, or ActionLink's context. Eg.

      private Integer verySpecificId;

      public void onPrepareForSubmit(Integer verySpecificId)

      { this. verySpecificId = verySpecificId; }

      However, Grid doesn't yet have a context parameter, so no context can be passed when a pager link or column sorting link is clicked. So an inplace request from a GridPager or column sort link can't remind its containing component of what was
      currently selected, how the Grid was being filtered, or what the containing component's parameters were. So how can the Grid be rendered correctly?

      To solve this for GridPager, I've produced an example in which I've created a GridWithContext to wrap a Grid, and modified GridPager to include the context in its links and bubble up a new event with the context. It's in JumpStart 7.0.5:


      Without this, we'd lose the selectedPersonId when a GridPager link is clicked. But with it, when you reach the right page the selected person is still highlighted.


        Issue Links



              Unassigned Unassigned
              geoffcallender Geoff Callender
              3 Vote for this issue
              1 Start watching this issue