I am trying to gain access to the value pair, in your example <p0,abc> as encoded in the URL. The params.getString("p0") does return abc in the constructor. It returns null if I try to retrieve it via getRequest.getParameter("p0") in getVariation().
Kent Tong wrote: > > mchack <mchack <at> cisco.com> writes: > >> I am using a mounted, bookmarkable page. I am passing in a parameter >> using >> the url syntax. This works fine when I access it via the Parameter object >> passed in at Page creation time. I would also expect that the parameter >> would be accessible via the request object and the parameter is not >> visible. >> I am trying to access in the getVariation() method I have overridden. Is >> this a bug or expected behavior. > > I just tried a page like: > > public class ReadParam extends WebPage { > public ReadParam(PageParameters params) { > System.out.println("constructing: " + params.getString("p1")); > } > > public String getVariation() { > System.out.println("getting variation: " > + getRequest().getParameter("p1")); > return null; > } > > } > > The page is mounted as /foo. The URL being accessed is > http://localhost:8080/Hello/app/foo/p0/abc?p1=def > > It works fine; it prints "def" at both times. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/Parameter-access-at-Page-creation-not-consistent-with-request-object-tf3849735.html#a10960366 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user