You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Angelo C." <an...@gmail.com> on 2010/12/01 14:36:54 UTC

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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: accessing parameters from request

Posted by "Angelo C." <an...@gmail.com>.
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: accessing parameters from request

Posted by Richard Hill <ri...@su3analytics.com>.
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. <an...@gmail.com>
Reply-to: "Tapestry users" <us...@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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org