|
Re: Getting Parameters from URL or Request Part II [message #31283 is a reply to message #31247] |
Wed, 06 June 2007 09:04 |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi Markus,
RAP doesn't change the request parameters. It only buffers the the
parameters in case of a additional browser-detection-request, so that they
don't get lost for the application programmer. But with the index-template
mechanism normally this request isn't send anymore - so you should get the
original request object.
Reading the request-values in the createUI-method works for us. If you want
to process the request-parameters earlier you should use a phaselistener
(before PrepareUIRoot). That's the earliest point where you could enter the
lifecycle.
The following codesnippet for the example URL
http://localhost/rap?var1=value1&var2=value2 ...
HttpServletRequest request = ContextProvider.getRequest();
Enumeration parameterNames = request.getParameterNames();
while( parameterNames.hasMoreElements() ) {
String key = ( String )parameterNames.nextElement();
System.out.println( key + ": " + request.getParameter( key ) );
}
....produces the following console log:
w4t_survey: true
w4t_width: 782
nocache: 1181120323906
w1.bounds.width: 782
w4t_height: 861
var1: value1
var2: value2
uiRoot: w1
requestCounter: 0
w4t_startup: default
w4t_scriptEnabled: true
w4t_ajaxEnabled: true
w1.bounds.height: 861
So if you get different parameters the problem must be s.th. else. But
actually we don't use the getParameterMap() we use getParameter() - maybe
there is a problem with that.
Ciao
Frank
"Markus Kr
|
|
|
|
Powered by
FUDForum. Page generated in 0.02828 seconds