Switch to a DataTable, IDataProvider has #model() exactly for your usecase.

And if you haven't already, read
  http://wicketinaction.com/2008/09/building-a-smart-entitymodel/

Sven

On 12/29/2011 03:48 PM, Anatoly Kupriyanov wrote:
Hi everybody!

I have a page which displays long list of messages. I use
LoadableDetachableModel for the list view, because it should display the
latest messages each time page renders. Each message has a ajax button to
make some action on the message. Each time I click the button, wicket loads
the list, looks up for the message (by index? or how?) and invokes my
"onClick" method.
It doesn't look great. What is a better approach to do it?
I want minimize memory usage (don't keep in session list of all messages)
and avoid querying the whole list each time from database (moreover, it is
changing!). The wise solution is to somehow refer a concrete button to a
message by the message PK and query only the message, but I don't know an
elegant way to do it, only fighting with the wicket approach.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to