Smart :)

Christopher Turner wrote:

Detachable models should only be reattached when the model is accessed. I wonder what is causing them to get attached so early on in the cycle. If you can identify why this is happening, please let us know by raising this as a bug.
Rather than creating 40 individual detachable model instances couldn't you create one detachable model that loads all 40 objects in one select statement and then wrap this within a property model that accesses an individual element within the detachable model as needed.
e.g.
class MyDataModel {
private transient Map items;
public void onAttach() {
// Load all items into the items map
}
public void onDetach() {
}
}
MyDataModel model = new MyDataModel();
PropertyModel item1Model = new PropertyModel(model, "items[\"id1\"]");
regards,
Chris


    -




------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to