Re: IModel-based multiple-selection DataTable

2014-05-28 Thread Sven Meier

Hi,

AbstractTree uses a ProviderSubset to keep the expanded nodes. Item 
comparison is based on model#equals().


Regards
Sven

On 05/27/2014 06:29 PM, ChambreNoire wrote:

Hello,

I'm trying to roll my own paginated multiple-selection datatable and I'm not
sure how to store the selected entities. Many of the solutions I have found
online simply add/remove selected entities to/from a SetMyEntity located
in the parent component however my DataProviders use
LoadableDetachableModels. I could always store them in a Set of IModels but
then I'd have to load everything for comparisons. I'm currently digging
around in the sources for DataTable and I'm thinking that maybe I would have
to provide a custom Item id generation based on the persistent entities' ids
and use that to determine whether an item is selected or not but I'm not too
sure about this approach (and would also make this solution un-generic)...

Has anyone else tried something along these lines?

Many Thanks,

Anthony

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IModel-based-multiple-selection-DataTable-tp4666043.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



IModel-based multiple-selection DataTable

2014-05-27 Thread ChambreNoire
Hello,

I'm trying to roll my own paginated multiple-selection datatable and I'm not
sure how to store the selected entities. Many of the solutions I have found
online simply add/remove selected entities to/from a SetMyEntity located
in the parent component however my DataProviders use
LoadableDetachableModels. I could always store them in a Set of IModels but
then I'd have to load everything for comparisons. I'm currently digging
around in the sources for DataTable and I'm thinking that maybe I would have
to provide a custom Item id generation based on the persistent entities' ids
and use that to determine whether an item is selected or not but I'm not too
sure about this approach (and would also make this solution un-generic)...

Has anyone else tried something along these lines?  

Many Thanks,

Anthony

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IModel-based-multiple-selection-DataTable-tp4666043.html
Sent from the Users forum mailing list archive at Nabble.com.

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