Yes, it's a workaround, and it has limitations which I mention in JumpStart 6 
where we were trying not to lose the filter's partialName:

        
http://jumpstart.doublenegative.com.au/jumpstart/together/ajaxcomponentscrud/persons

In that example:

    @Property
    // If we use @ActivationRequestParameter instead of @Persist, then our 
handler for filter form success would have
    // to render more than just the listZone, it would have to render all other 
links and forms: it would need a zone
    // around the "Create..." link so it could render it; and it would render 
the editorZone, which would be destructive
    // if the user has been typing into Create or Update. Alternatively, it 
could use a custom JavaScript callback to
    // update the partialName in all other links and forms - see 
AjaxResponseRenderer#addCallback(JavaScriptCallback).
    @Persist
    private String partialName;

Instead, I'm suggesting that if we make Grid behave like Form, EventLink, and 
ActionLink, then we won't need workarounds, as shown here:

        
http://jumpstart.doublenegative.com.au/jumpstart7/together/ajaxcomponentscrud/persons

Cheers,

Geoff

On 25/02/2014, at 12:10 AM, Dmitry Gusev wrote:

> Hi Geoff,
> 
> another way to handle this situation (a workaround?) is by using
> @ActivationRequestParameter("paramName") attribute on page properties.
> This is what I do for my projects and what's working for me.
> 
> 
> 
> On Mon, Feb 24, 2014 at 4:20 PM, Geoff Callender <
> geoff.callender.jumpst...@gmail.com> wrote:
> 
>> To participate in nested components in an AJAX page we can utilise Form's,
>> EventLink's, and ActionLink's context parameter. It can be used to pass the
>> parameters of the enclosing component. The containing component's event
>> handlers can receive the context and set its parameters from them before
>> making any decisions. This works well.
>> 
>> However, Grid doesn't have a context parameter. Consequently, when the
>> user chooses a new page in a GridPager, or a new sort order in a Grid
>> column, the containing component doesn't know the context and consequently
>> might not be able to render the Grid correctly.
>> 
>> 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, I would lose the selectedPersonId when I a GridPager link.
>> 
>> So I think Grid needs a context. Or is there another existing way to
>> handle this problem?
>> 
>> There's an existing JIRA for this.
>> https://issues.apache.org/jira/browse/TAP5-1162
>> 
>> Cheers,
>> 
>> Geoff
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> Dmitry Gusev
> 
> AnjLab Team
> http://anjlab.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to