mardi 25 juin 2013

Wicket: Get Request Parameter from URL

In case you want to retrieve a value from the URL  , you can simply do it with Wicket 1.5  with one line of code :

StringValue game = RequestCycle.get().getRequest().getRequestParameters().getParameterValue("game");

there is also a several  paramters you can retrieve from URL like : 
  1. getClientUrl()
  2. getOriginalUrl()
  3. getUrl()
keep it simple,keep it clean  :)

Aucun commentaire:

Enregistrer un commentaire