Re: How do I create a detachable model for a ListView?

2011-06-16 Thread Dan Retzlaff
CheeseDetach does do something for detach(), but it's implemented for you in LoadableDetachableModel. To really understand what's going on you should look at that class' implementation. It's straight forward.

How do I create a detachable model for a ListView?

2011-06-15 Thread Brian Lavender
I am trying to create a ListView using a detachable model, but I just can't seem to figure out how to construct my DetachableModel. Basically, I would like to create a detachable model and then pass it to my constructor for a CheeseList. This is built upon the code for the examples for Wicket in

Re: How do I create a detachable model for a ListView?

2011-06-15 Thread Dan Retzlaff
Look carefully at the ListView's constructor arguments. It wants an IModelListCheese, not an IModelCheese which is what your current CheeseDetach provides. Depending on your goals, you can either (1) change CheeseDetach.load() to call getCheeses(), or (2) change the constructor to accept a list of

Re: How do I create a detachable model for a ListView?

2011-06-15 Thread Brian Lavender
Dan, thank you for pointing that out. That makes more sense. So, it looks like now that my List of Cheeses will not get cached between pages saving space? And this is because the model doesn't do anything for detach but only does load, so every time, it will get it from the DAO? Here is the code