Ah, yes. 1. was a bug indeed. If detaching is too expensive, the model in question can handle that.

Eelco

Eelco Hillenius wrote:

Did 2. Not sure what the problem is with 1.

Eelco

Cameron Braid wrote:

2 things :

1)

In AbstractDetachableModel , the detach() method only detaches the nested model if ! attached !! that seems odd to me.

I would think that if the nested model exists, it should always be detached.

So I think its just a simple removal of the else !

2) LoadableDetachableModel

Can getNestedModel() be made non final – since I wish to be able to build LoadableDetachableModels that have nested models.

For example – in my grid editor – I need to add X null items to the provided model

protected IModel makeListViewModel(final IModel listModel) {

return new LoadableDetachableModel() {

@Override

public IModel getNestedModel() {

return listModel;

}

@Override

protected Object load() {

List list = (List)listModel.getObject(null);

for (int i = 0; i < 10; i++) {

list.add(null);

}

return list;

}

};

}

I could use a custom Model implementation – however it seems like this is a natural fit.


Cameron.




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to