You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Holloway <bi...@gmail.com> on 2008/03/19 06:51:02 UTC

T5: Page w/ activation context needs property set

I have an actionlink method to redirect to a page that has an
activation context but that also needs to have a settable property set
on it before I send the browser there.  I don't want to pump the
property into application state.

I would like to be able to use _componentResources.createPageLink
(...) to return a Link to the page, but I can't set the target page's
(needed) page property.

Any suggestions?

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


Re: T5: Page w/ activation context needs property set

Posted by Howard Lewis Ship <hl...@gmail.com>.
You can do some tricky things, such as have more than on activate
method, using different numbers of parameters.  The activate event
handler methods are called in order of parameter count, largest number
to fewest.

It's really hard to discuss in the abstract.

If the value can be coerced back and forth to a string, you should be
all set: i.e., a number, date, etc.  With tapestry-hibernate (in
5.0.11 and up) any entity object will be converted to a string rep of
its primary key, and back.  It all Just Works.

On Wed, Mar 19, 2008 at 1:44 PM, Bill Holloway <bi...@gmail.com> wrote:
> I'll try this, but the property I need to set is not a simple string at all.
>
>
>  Bill
>
>
>
>  On Wed, Mar 19, 2008 at 5:52 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
>  > You can set your property and then call onActivate(...) on an instance
>  >  of the page injected via @InjectPage and then return that. If your
>  >  onPassivate method returns the correct activation context I think it'll
>  >  work. The property will have to be persistent, of course.
>  >
>  >  -Filip
>  >
>  >
>  >
>  >  On 2008-03-19 11:05, Adam Zimowski wrote:
>  >  > I was on the same boat just the other day. I ended up moving that
>  >  > property to the context and it worked fine for me.
>  >  >
>  >  > On Wed, Mar 19, 2008 at 12:51 AM, Bill Holloway <bi...@gmail.com> wrote:
>  >  >> I have an actionlink method to redirect to a page that has an
>  >  >>  activation context but that also needs to have a settable property set
>  >  >>  on it before I send the browser there.  I don't want to pump the
>  >  >>  property into application state.
>  >  >>
>  >  >>  I would like to be able to use _componentResources.createPageLink
>  >  >>  (...) to return a Link to the page, but I can't set the target page's
>  >  >>  (needed) page property.
>  >  >>
>  >  >>  Any suggestions?
>  >  >>
>  >  >>  ---------------------------------------------------------------------
>  >  >>  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
>  >  >
>  >
>  >  ---------------------------------------------------------------------
>  >  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
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: Page w/ activation context needs property set

Posted by Bill Holloway <bi...@gmail.com>.
I'll try this, but the property I need to set is not a simple string at all.


Bill

On Wed, Mar 19, 2008 at 5:52 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> You can set your property and then call onActivate(...) on an instance
>  of the page injected via @InjectPage and then return that. If your
>  onPassivate method returns the correct activation context I think it'll
>  work. The property will have to be persistent, of course.
>
>  -Filip
>
>
>
>  On 2008-03-19 11:05, Adam Zimowski wrote:
>  > I was on the same boat just the other day. I ended up moving that
>  > property to the context and it worked fine for me.
>  >
>  > On Wed, Mar 19, 2008 at 12:51 AM, Bill Holloway <bi...@gmail.com> wrote:
>  >> I have an actionlink method to redirect to a page that has an
>  >>  activation context but that also needs to have a settable property set
>  >>  on it before I send the browser there.  I don't want to pump the
>  >>  property into application state.
>  >>
>  >>  I would like to be able to use _componentResources.createPageLink
>  >>  (...) to return a Link to the page, but I can't set the target page's
>  >>  (needed) page property.
>  >>
>  >>  Any suggestions?
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  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
>  >
>
>  ---------------------------------------------------------------------
>  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


Re: T5: Page w/ activation context needs property set

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
You can set your property and then call onActivate(...) on an instance 
of the page injected via @InjectPage and then return that. If your 
onPassivate method returns the correct activation context I think it'll 
work. The property will have to be persistent, of course.

-Filip

On 2008-03-19 11:05, Adam Zimowski wrote:
> I was on the same boat just the other day. I ended up moving that
> property to the context and it worked fine for me.
> 
> On Wed, Mar 19, 2008 at 12:51 AM, Bill Holloway <bi...@gmail.com> wrote:
>> I have an actionlink method to redirect to a page that has an
>>  activation context but that also needs to have a settable property set
>>  on it before I send the browser there.  I don't want to pump the
>>  property into application state.
>>
>>  I would like to be able to use _componentResources.createPageLink
>>  (...) to return a Link to the page, but I can't set the target page's
>>  (needed) page property.
>>
>>  Any suggestions?
>>
>>  ---------------------------------------------------------------------
>>  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
> 

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


Re: T5: Page w/ activation context needs property set

Posted by Adam Zimowski <zi...@gmail.com>.
I was on the same boat just the other day. I ended up moving that
property to the context and it worked fine for me.

On Wed, Mar 19, 2008 at 12:51 AM, Bill Holloway <bi...@gmail.com> wrote:
> I have an actionlink method to redirect to a page that has an
>  activation context but that also needs to have a settable property set
>  on it before I send the browser there.  I don't want to pump the
>  property into application state.
>
>  I would like to be able to use _componentResources.createPageLink
>  (...) to return a Link to the page, but I can't set the target page's
>  (needed) page property.
>
>  Any suggestions?
>
>  ---------------------------------------------------------------------
>  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