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

Reply via email to