You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Geoff Callender (JIRA)" <ji...@apache.org> on 2014/03/05 12:29:42 UTC

[jira] [Created] (TAP5-2297) Grid needs a context to properly participate in AJAX pages

Geoff Callender created TAP5-2297:
-------------------------------------

             Summary: Grid needs a context to properly participate in AJAX pages
                 Key: TAP5-2297
                 URL: https://issues.apache.org/jira/browse/TAP5-2297
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.3, 5.4
            Reporter: Geoff Callender


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.

@Parameter
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 link is clicked. 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 preview-6: 

        http://jumpstart.doublenegative.com.au/jumpstart7/

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.




--
This message was sent by Atlassian JIRA
(v6.2#6252)