>Thiago has the right solution; inject the target page, configure it
> and return it.
I use both, but if you maintain that is the best way then I can't argue the 
contrary... nevertheless, flash persistence has its failings, I prefer using 
the onActivate and onPassivate patten which is more reliable, besides injecting 
the correct page is also not always an option... If you look at the link 
example below, simply attach a parameter tag to it then you have a generic 
callback component, so any page can activate it and then you can return the 
user to the calling page, how would you achieve that by injecting a page?
 
Peter

----- Original Message -----
From: "Howard Lewis Ship" <hls...@gmail.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Thursday, 16 April, 2009 18:32:13 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: How to pass multiple parameters to the next page

Peter;

Thiago has the right solution; inject the target page, configure it
and return it.

Thiago's approach was to store the data inside persistent fields,
using the flash strategy.

I would tend, instead, to use a page activation context; like any
event context, it allows multiple values, returned as an array or
list.

On Thu, Apr 16, 2009 at 7:25 AM, Peter Stavrinides
<p.stavrini...@albourne.com> wrote:
> There is no best way, but you have a few of options:
>
> You can simply return a link object:
>
> @Inject
> private ComponentResources _resources;
> private Class<?> _callback;
> private Object[] _context;
>
>
> Object onSuccess() {
> Link link = _resources.createPageLink(_callback, true, _context);
> return link;
> }
>
>
> Or you can inject, activate and return the page object
> @InjectPage
> private Message messagePage_;
>
> /** a submit event */
>        Object onSuccess() {
>                messagePage_.onActivate(
>                                "Thankyou, your message has been sent 
> successfully!",100021551);
>
>                return messagePage_;
>        }
>
> Peter
>
> ----- Original Message -----
> From: "Anton Marchenkov" <m...@handybank.ru>
> To: users@tapestry.apache.org
> Sent: Thursday, 16 April, 2009 17:04:35 GMT +02:00 Athens, Beirut, Bucharest, 
> Istanbul
> Subject: How to pass multiple parameters to the next page
>
> Hello!
>
> What is the best way to pass multiple parameters to the next page on
> OnSubmit event in Tapestry 5.1?
>
> --
> Best Regards,
> Anton Marchenkov.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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


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

Reply via email to