Re: update table with ajax
Fantastic !! Thanks very much. On Thu, Jun 19, 2008 at 12:33 PM, wicket user <[EMAIL PROTECTED]> wrote: > add the DataTable in a WebmarkupContainer and repaint the container > > cheers > dipu > > > On Thu, Jun 19, 2008 at 4:27 PM, Manuel Corrales <[EMAIL PROTECTED] > > > wrote: > > > Hi, i have an input and a link. The link is an ajax link, and then i want > > to > > update a table on the same page according to the input. > > > > final DataView table = new DataView("table", new > > ListDataProvider(Collections.EMPTY_LIST)) { > >public void populateItem(final Item item) { > >item.add(new Label("nroAparato","test")); > >}}; > >table.setOutputMarkupId(true); > >add(table); > > > >AjaxLink link = new AjaxLink("linkSearchCliente") { > > > >@Override > >public void onClick(AjaxRequestTarget target) { > >target.addComponent(table); > >} > >}; > > > > I get this error: > > > > *This component is a repeater and cannot be repainted via ajax directly. > > Instead add its parent or another markup container higher in the > > hierarchy.* > > > > How can i solve this, i was unable to find any simple table update on the > > web. > > > > Thanks in advance!! > > >
Re: update table with ajax
add the DataTable in a WebmarkupContainer and repaint the container cheers dipu On Thu, Jun 19, 2008 at 4:27 PM, Manuel Corrales <[EMAIL PROTECTED]> wrote: > Hi, i have an input and a link. The link is an ajax link, and then i want > to > update a table on the same page according to the input. > > final DataView table = new DataView("table", new > ListDataProvider(Collections.EMPTY_LIST)) { >public void populateItem(final Item item) { >item.add(new Label("nroAparato","test")); >}}; >table.setOutputMarkupId(true); >add(table); > >AjaxLink link = new AjaxLink("linkSearchCliente") { > >@Override >public void onClick(AjaxRequestTarget target) { >target.addComponent(table); >} >}; > > I get this error: > > *This component is a repeater and cannot be repainted via ajax directly. > Instead add its parent or another markup container higher in the > hierarchy.* > > How can i solve this, i was unable to find any simple table update on the > web. > > Thanks in advance!! >
Re: update table with ajax
You got to wrap it in a markupcontainer, and add that instead.. theres something on the wiki about this... http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html Manuel Corrales wrote: Hi, i have an input and a link. The link is an ajax link, and then i want to update a table on the same page according to the input. final DataView table = new DataView("table", new ListDataProvider(Collections.EMPTY_LIST)) { public void populateItem(final Item item) { item.add(new Label("nroAparato","test")); }}; table.setOutputMarkupId(true); add(table); AjaxLink link = new AjaxLink("linkSearchCliente") { @Override public void onClick(AjaxRequestTarget target) { target.addComponent(table); } }; I get this error: *This component is a repeater and cannot be repainted via ajax directly. Instead add its parent or another markup container higher in the hierarchy.* How can i solve this, i was unable to find any simple table update on the web. Thanks in advance!! -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
update table with ajax
Hi, i have an input and a link. The link is an ajax link, and then i want to update a table on the same page according to the input. final DataView table = new DataView("table", new ListDataProvider(Collections.EMPTY_LIST)) { public void populateItem(final Item item) { item.add(new Label("nroAparato","test")); }}; table.setOutputMarkupId(true); add(table); AjaxLink link = new AjaxLink("linkSearchCliente") { @Override public void onClick(AjaxRequestTarget target) { target.addComponent(table); } }; I get this error: *This component is a repeater and cannot be repainted via ajax directly. Instead add its parent or another markup container higher in the hierarchy.* How can i solve this, i was unable to find any simple table update on the web. Thanks in advance!!