Jesse, thanks for fixing this in Wicket 6.3.0! https://issues.apache.org/jira/browse/WICKET-4865
On Mon, Nov 5, 2012 at 10:50 PM, matmar [via Apache Wicket] < [email protected]> wrote: > Hi! > > We have a problem with using CryptoMapper, and a proposed fix. I'd like > some comments from this community regarding both the bug and the fix. > > When CryptoMapper is used, query parameters are only found via > PageParameters, and not via RequestParameters, as expected. > > Code to repro: > ------code----- > HomePage.java > > public HomePage(final PageParameters parameters) { > add(new Label("version", > getApplication().getFrameworkSettings().getVersion())); > add(new Label("fooFromPageParameters", > parameters.get("foo").toString("NOT_FOUND_FROM_PAGE_PARAMETERS"))); > add(new Label("fooFromRequestParameters", > getRequest().getRequestParameters().getParameterValue("foo").toString("NOT_FOUND_FROM_REQUEST_PARAMETERS"))); > > } > > HomePage.html > > <div id="bd"> > Congratulations! <p>Wicket > version: <wicket:container > wicket:id="version">1.5-SNAPSHOT</wicket:container></p> > <p>Foo from Page parameters: <wicket:container > wicket:id="fooFromPageParameters">fooFromPageParametes</wicket:container></p> > <p>Foo from request parameters: <wicket:container > wicket:id="fooFromRequestParameters">fooFromRequestParameters</wicket:container></p> > </div> > > WicketApplication.java > > public void init() > { > super.init(); > //comment to get both parameters working > setRootRequestMapper(new > CryptoMapper(getRootRequestMapper(), this)); > > } > > When called with url http://localhost:8080/?foo=bar, and CryptoMapper is > enabled, the value for foo is not found via requestParameters. > > ----code------- > > And then the proposed fix: > http://pastebin.com/dWdPhcLD > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-wicket.1842946.n4.nabble.com/Wicket-CryptoMapper-loses-RequestParameters-for-HomePage-1-5-SNAPSHOT-tp4653637.html > This email was sent by > matmar<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=99626>(via > Nabble) > To receive all replies by email, subscribe to this > discussion<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=subscribe_by_code&node=4653637&code=bWFyY3VzLm1hdHRpbGFAZ21haWwuY29tfDQ2NTM2Mzd8LTg4NDY3MDUxNg==> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-CryptoMapper-loses-RequestParameters-for-HomePage-1-5-SNAPSHOT-tp4653637p4654110.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
