T5: accessing parameters from request
Hi, I have a standard form that has an action to call BeforeProc, where email can be accessed from request, but when BeforeProc returns AfterProc, the request.getParameter(email) is null, why? public class BeforeProc { @Inject private Request request; Object onActivate() { return sub_proc(); } Object sub_proc() { String email = request.getParameter(email); // email has value return AfterProc; } } public class AfterProc { @Inject private Request request; Object onActivate() { String email = request.getParameter(email); // email is null here } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-accessing-parameters-from-request-tp3287653p3287653.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: accessing parameters from request
sub_proc() is returning AfterProc, which will resolve simply to the page as is with no parameters. If you want to pass parameters to AfterProc page the sub_proc should return a Link with the email added as a query parameter. -Original Message- From: Angelo C. angelochen...@gmail.com Reply-to: Tapestry users users@tapestry.apache.org To: users@tapestry.apache.org Subject: T5: accessing parameters from request Date: Wed, 1 Dec 2010 05:36:54 -0800 (PST) Hi, I have a standard form that has an action to call BeforeProc, where email can be accessed from request, but when BeforeProc returns AfterProc, the request.getParameter(email) is null, why? public class BeforeProc { @Inject private Request request; Object onActivate() { return sub_proc(); } Object sub_proc() { String email = request.getParameter(email); // email has value return AfterProc; } } public class AfterProc { @Inject private Request request; Object onActivate() { String email = request.getParameter(email); // email is null here } } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: accessing parameters from request
thanks, it works! -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-accessing-parameters-from-request-tp3287653p3287683.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org