You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gerald Schöffel <ta...@online.de> on 2006/05/30 18:52:37 UTC

How to implement a 'application property with persistence strategy client:app' ?

Hi there !

I need to persist a application-scope property on the client side, 
without using of a session and/or an ASO and without a reference to a 
specific page.

In fact I need to be able to compare a value stored in a visit-ASO with 
the persisted property send from the client.

This property should by added to every url until a condition is met to 
erase the state from the client.

But I have no idea, how to do so :(

Every example and/or the docs I've found so far are dealing with 
page-properties and therefor the code is very page-centric.

Could I just omit the pageName in those examples and I am done ?

Thank you in advance,
Gerald

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to implement a 'application property with persistence strategy client:app' ?

Posted by Gerald Schöffel <ta...@online.de>.
Well, this is bad news :(

I redesigned a part of my application to use only one 'flag' and 
implemented a strategy which is able to persist this flag in application 
scope (adding a simple '?myflag=myvalue' key/value pair to the url).

I can control the lifecycle of the flag from inside the strategy - so 
for my problem I am currently done ... *happy*

But seeing a solution mentioned in your JIRA issue in 4.1 would be 
really really cool ...

Thanks,
Gerald

Henri Dupre wrote:
> I asked here long ago and Howard answered that in Tapestry 4 this is not
> possible due to some internal design.
> I opened an JIRA issue http://issues.apache.org/jira/browse/TAPESTRY-729.
> Is there any chance for this to make it for tapestry 4.1?
> 
> Henri.
> 
> 
> On 5/30/06, Gerald Schöffel <ta...@online.de> wrote:
>>
>> Hi Norbert,
>>
>> thank you for your quick reply !
>>
>> The problem with "client:app" is, that it stores the property of the
>> page in a application scope.
>>
>> So every time I browse to this page the property is set to the persisted
>> value.
>>
>> I need exactly this behaviour independent of a page, so every page with
>> a @Persist("mystrategy:app") annotation gets the associated property set.
>>
>> When  looking at ClientPropertyPersistenceStrategy in every method there
>> is a parameter 'pageName' :(
>>
>> Anyone an idea, how to get rid of it ? :)
>>
>> Thanks
>> Gerald
>>
>> Norbert Sándor wrote:
>> > What about the strategy "client:app"?
>> > If not then check out ClientPropertyPersistenceStrategy and the related
>> > classes for reference (eg. how to add a value into every URL).
>> >
>> > Regards,
>> > Norbi
>> >
>> > Gerald Schöffel wrote:
>> >> Hi there !
>> >>
>> >> I need to persist a application-scope property on the client side,
>> >> without using of a session and/or an ASO and without a reference to a
>> >> specific page.
>> >>
>> >> In fact I need to be able to compare a value stored in a visit-ASO
>> >> with the persisted property send from the client.
>> >>
>> >> This property should by added to every url until a condition is met to
>> >> erase the state from the client.
>> >>
>> >> But I have no idea, how to do so :(
>> >>
>> >> Every example and/or the docs I've found so far are dealing with
>> >> page-properties and therefor the code is very page-centric.
>> >>
>> >> Could I just omit the pageName in those examples and I am done ?
>> >>
>> >> Thank you in advance,
>> >> Gerald
>> >>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to implement a 'application property with persistence strategy client:app' ?

Posted by Henri Dupre <he...@gmail.com>.
I asked here long ago and Howard answered that in Tapestry 4 this is not
possible due to some internal design.
I opened an JIRA issue http://issues.apache.org/jira/browse/TAPESTRY-729.
Is there any chance for this to make it for tapestry 4.1?

Henri.


On 5/30/06, Gerald Schöffel <ta...@online.de> wrote:
>
> Hi Norbert,
>
> thank you for your quick reply !
>
> The problem with "client:app" is, that it stores the property of the
> page in a application scope.
>
> So every time I browse to this page the property is set to the persisted
> value.
>
> I need exactly this behaviour independent of a page, so every page with
> a @Persist("mystrategy:app") annotation gets the associated property set.
>
> When  looking at ClientPropertyPersistenceStrategy in every method there
> is a parameter 'pageName' :(
>
> Anyone an idea, how to get rid of it ? :)
>
> Thanks
> Gerald
>
> Norbert Sándor wrote:
> > What about the strategy "client:app"?
> > If not then check out ClientPropertyPersistenceStrategy and the related
> > classes for reference (eg. how to add a value into every URL).
> >
> > Regards,
> > Norbi
> >
> > Gerald Schöffel wrote:
> >> Hi there !
> >>
> >> I need to persist a application-scope property on the client side,
> >> without using of a session and/or an ASO and without a reference to a
> >> specific page.
> >>
> >> In fact I need to be able to compare a value stored in a visit-ASO
> >> with the persisted property send from the client.
> >>
> >> This property should by added to every url until a condition is met to
> >> erase the state from the client.
> >>
> >> But I have no idea, how to do so :(
> >>
> >> Every example and/or the docs I've found so far are dealing with
> >> page-properties and therefor the code is very page-centric.
> >>
> >> Could I just omit the pageName in those examples and I am done ?
> >>
> >> Thank you in advance,
> >> Gerald
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Thanks,

Henri.

Re: How to implement a 'application property with persistence strategy client:app' ?

Posted by Gerald Schöffel <ta...@online.de>.
Hi Norbert,

thank you for your quick reply !

The problem with "client:app" is, that it stores the property of the 
page in a application scope.

So every time I browse to this page the property is set to the persisted 
value.

I need exactly this behaviour independent of a page, so every page with 
a @Persist("mystrategy:app") annotation gets the associated property set.

When  looking at ClientPropertyPersistenceStrategy in every method there 
  is a parameter 'pageName' :(

Anyone an idea, how to get rid of it ? :)

Thanks
Gerald

Norbert Sándor wrote:
> What about the strategy "client:app"?
> If not then check out ClientPropertyPersistenceStrategy and the related 
> classes for reference (eg. how to add a value into every URL).
> 
> Regards,
> Norbi
> 
> Gerald Schöffel wrote:
>> Hi there !
>>
>> I need to persist a application-scope property on the client side, 
>> without using of a session and/or an ASO and without a reference to a 
>> specific page.
>>
>> In fact I need to be able to compare a value stored in a visit-ASO 
>> with the persisted property send from the client.
>>
>> This property should by added to every url until a condition is met to 
>> erase the state from the client.
>>
>> But I have no idea, how to do so :(
>>
>> Every example and/or the docs I've found so far are dealing with 
>> page-properties and therefor the code is very page-centric.
>>
>> Could I just omit the pageName in those examples and I am done ?
>>
>> Thank you in advance,
>> Gerald
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to implement a 'application property with persistence strategy client:app' ?

Posted by Norbert Sándor <de...@erinors.com>.
What about the strategy "client:app"?
If not then check out ClientPropertyPersistenceStrategy and the related 
classes for reference (eg. how to add a value into every URL).

Regards,
Norbi

Gerald Schöffel wrote:
> Hi there !
>
> I need to persist a application-scope property on the client side, 
> without using of a session and/or an ASO and without a reference to a 
> specific page.
>
> In fact I need to be able to compare a value stored in a visit-ASO 
> with the persisted property send from the client.
>
> This property should by added to every url until a condition is met to 
> erase the state from the client.
>
> But I have no idea, how to do so :(
>
> Every example and/or the docs I've found so far are dealing with 
> page-properties and therefor the code is very page-centric.
>
> Could I just omit the pageName in those examples and I am done ?
>
> Thank you in advance,
> Gerald
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org