this is where wicket differs from a lot of other frameworks and sometimes its hard to wrap your mind around it: the components are persistent across requests, they keep their state.
so really what you should do is something like this:
IModel listModel=new LoadableDetachableModel() {
Object load() {
return DataObjectsFactory.getMyList();
}
}
final ListView mylistview;
add(mylistview=new ListView("id", listModel) {
populateitem(....) {....}
IModel getListItemModel(...) { ... }
}.setOutputMarkupId(true));
and then in the ajax handler all you have to do is to add the listview to the target so it is queued for repainting : target.add(mylistview);
-Igor
On 8/8/06, Frank Bille <[EMAIL PROTECTED]> wrote:
On 8/9/06, Pierre-Yves Saumont < [EMAIL PROTECTED]> wrote:myList = DataObjectsFactory.getMyList();
myListView = new MyListView("id", myList);
myListView.setOutputMarkupId(true);
target.addComponent(myListView);It doesn't look like you add/replace that myListView to a parent. OutputMarkupId can't be calculated when it's not attached to a parent. And what more you still need to keep the component hierachy on the server. So basically you would just replace your old listview with this new one.
Frank
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
