Hi,
Is that possible to refactor the Grid that currentPage, sortColumn and
sortAsceding are parameters rather than @Persist-ed fields and bind them
by default to internal @Persist-ed fields? So, by default Grid will use
@Persist storage for saving those, but if you override the parameters it
will use the provided values (and do not use @Persist storage).
Example, default behavior:
Page.tml:
<t:grid ... /> <!-- Use @Persist, as it's done now -->
Example, overriden behaviour:
Page.java:
@Property
private int currentPage = 1;
@Property
private String sortColumnId;
@Property
private boolean sortAscending = true;
void onActivate(int page, String column, boolean ascending) {
this.currentPage = page;
this.sortColumnId = column;
this.sortAscending = ascending;
}
Object[] onPassivate() {
return new Object[] { page, column, ascending };
}
Page.tml:
<t:grid ... t:currentPage="currentPage" t:sortColumnId="sortColumnId"
t:sortAscending="sortAscending" />
In the second case, Grid will not use persisted storage at all.
Howard Lewis Ship wrote:
> I believe the problem is the use of the Grid, which uses @Persist
> fields to track the paging and sort status.
>
>
> On Tue, Oct 28, 2008 at 7:01 AM, Russell Brown <[EMAIL PROTECTED]> wrote:
>
>> Why not use an activation context on the page to persist your parameters
>> between requests?
>>
>> -----Original Message-----
>> From: tapestry5 [mailto:[EMAIL PROTECTED]
>> Sent: 28 October 2008 13:47
>> To: [email protected]
>> Subject: Re: Persist issue with Paging
>>
>>
>> Is there any other way to pass parameter without making the field
>> @Persist.
>>
>>
>> Howard Lewis Ship wrote:
>>
>>> It can be innefficient, but setting the page's default persistent
>>> strategy to "client" will do the job. The Grid component will pick up
>>> this default. The persistent field data will end up in the URL.
>>>
>>> On Mon, Oct 27, 2008 at 12:39 PM, tapestry5 <[EMAIL PROTECTED]>
>>>
>> wrote:
>>
>>>> I am working on 5.0.13 version of Tapestry.
>>>>
>>>> I have a page with list of employees using t:grid.
>>>>
>>>> I have a paging feature in that.
>>>>
>>>> Now there are 2 fields which i want to send as a parameter. I can
>>>>
>> insert
>>
>>>> @Persist annotation on those fields but i don't want any session to
>>>>
>> be
>>
>>>> maintained, as i have clustered server. So the session will not help
>>>>
>> me.
>>
>>>> Is there any other way to pass parameter in paging with making the
>>>>
>> field
>>
>>>> @Persist.
>>>>
>>>> Thanks,
>>>> --
>>>> View this message in context:
>>>>
>>>>
>> http://www.nabble.com/Persist-issue-with-Paging-tp20194836p20194836.html
>>
>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator Apache Tapestry and Apache HiveMind
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Persist-issue-with-Paging-tp20194836p20207516.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
>
>
--
WBR,
Ivan S. Dubrov