We have a page that has a rather big DataView list. We need to be able to
make insertions and removals of this list without sending back the whole
list via AJAX as its a bit slow over the wire.
Is it possible to add a new element and return and insert that into the
list? Obviously we could insert in new item with JS on the page but we
still want to take advantage to any handlers in wicket for that new item
inserted into the list.
So something like:
....onSubmit(AjaxRequestTarget target)
Item<MyModel> item = new Item(); //!!
item.add(new AjaxFormComponentUpdatingBehavior("onchange")
{ protected void onUpdate(AjaxRequestTarget target) {...}});
thelist.add(item); //!!
...
target.appendJavaScript(js);
thanks
Wayne
make insertions and removals of this list without sending back the whole
list via AJAX as its a bit slow over the wire.
Is it possible to add a new element and return and insert that into the
list? Obviously we could insert in new item with JS on the page but we
still want to take advantage to any handlers in wicket for that new item
inserted into the list.
So something like:
....onSubmit(AjaxRequestTarget target)
Item<MyModel> item = new Item(); //!!
item.add(new AjaxFormComponentUpdatingBehavior("onchange")
{ protected void onUpdate(AjaxRequestTarget target) {...}});
thelist.add(item); //!!
...
target.appendJavaScript(js);
thanks
Wayne