Were you able to find a solution?
LLehtinen wrote:
>
> Hi -
>
> I have "normal" POST requests coming from an external website. I would
> like to have a model object's members populated with the matching HTTP
> parameter values sent in the request. I have a feeling that there is an
> obvious an elegant way of having Wicket do this for me, but I can't seem
> to figure it out at this late hour. I would appreciate it if someone
> could point me to the right direction!
>
> Right now I'm depending on a bunch of getRequest().getParameter() calls
> which seems way too servlet-ish to be the "right" way of doing this.
>
> For clarity:
>
> Let's say the incoming POST request contains the following parameters:
> id and name.
>
> I would like to have Wicket populate a POJO (a model object) like this
> for me:
>
> public class ModelObject {
> private Long id;
> private String name;
>
> .. getters & setters ..
>
> }
>
> instead of doing
>
> Long id = Long.parseLong(getRequest().getParameter("id"));
> String name = getRequest().getParameter("name");
>
> Thank you all for your quick responses to my earlier questions.
>
> --
> LL
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/Populating-a-model-with-form-data-from-external-site-tp17395075p25000791.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]