Hello Gabriel,
thanks for your reply.
It works the way you described it. Thanks for that! :)
here's how it looks like now, maybe it helps someone else with the same problem:
// the variable tp is the already existing table panel on the page.
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
tp = new TablePanel(tp.getId(), getItemList(selectedFromDropDown));
tp.setOutputMarkupId(true);
getPage().replace(tp);
target.add(tp);
}
Regards,
Werner
> Date: Wed, 7 Sep 2011 14:47:50 -0700
> From: [email protected]
> To: [email protected]
> Subject: Re: Replacing the contents of a table with ajax
>
> Maybe you should try something like :
>
> protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
>
> TablePanel tp = new TablePanel(tablePanel.getId(),
> getItemList(selectedFromDropDown));
> tp.setOutputMarkupId(true);
>
> //replace the panel of you page
> getPage().replace(tp); //or getPage().replaceWith(tp);
>
> target.add(tp);
> }
>
> Regards,
>
> Gabriel.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Replacing-the-contents-of-a-table-with-ajax-tp3796223p3797361.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]
>