Re: Component.wrap and IChainingModel

2007-11-12 Thread ChuckDeal
Dmitry Kandalov wrote: On Thursday 08 November 2007 23:28:40 ChuckDeal wrote: Perhaps I didn't get the explanation but why can't you wrap models in this order? AppendingListModel(     SortingModel(         HibernateListModel()     ) ) In that order the list would be

Re: Component.wrap and IChainingModel

2007-11-12 Thread Dmitry Kandalov
On Monday 12 November 2007 22:13:33 ChuckDeal wrote: You're right. But if you were not using List you could return SortedSet from SortingModel and it would work :) But then I'd be using a Set instead of a List.  DropDownChoice (via AbstractChoice) expects the choices model to represent a

Re: Component.wrap and IChainingModel

2007-11-09 Thread Dmitry Kandalov
On Thursday 08 November 2007 23:28:40 ChuckDeal wrote: Perhaps I didn't get the explanation but why can't you wrap models in this order? AppendingListModel(     SortingModel(         HibernateListModel()     ) ) In that order the list would be sorting PRIOR to appending the item,

Re: Component.wrap and IChainingModel

2007-11-08 Thread ChuckDeal
Dmitry Kandalov wrote: On Wednesday 07 November 2007 01:18:32 ChuckDeal wrote: SortingModel (IChainingModel) - AppendingListModel (IComponentAssignmentModel) - HibernateListModel (database oriented model that returns a list of items from the db, unsorted). Perhaps I didn't get the

Re: Component.wrap and IChainingModel

2007-11-08 Thread Dmitry Kandalov
On Wednesday 07 November 2007 01:18:32 ChuckDeal wrote: SortingModel (IChainingModel) - AppendingListModel (IComponentAssignmentModel) - HibernateListModel (database oriented model that returns a list of items from the db, unsorted). Perhaps I didn't get the explanation but why can't you wrap

Re: Component.wrap and IChainingModel

2007-11-08 Thread ChuckDeal
Johan Compagner wrote: SortingModel (IChainingModel) - AppendingListModel (IComponentAssignmentModel) - HibernateListModel (database oriented model that returns a list of items from the db, unsorted). So the sorting model is the outside one that you give to the component But if

Re: Component.wrap and IChainingModel

2007-11-06 Thread Johan Compagner
But if it traverses and then call wrapOnAssignment on the first one it finds what do all the chained models do then? Why are they there? Because from that moment on those chained are completel gone. They could even be gc'ed So this only works if getObject from them are doing nothing more then

Re: Component.wrap and IChainingModel

2007-11-06 Thread ChuckDeal
Johan Compagner wrote: But if it traverses and then call wrapOnAssignment on the first one it finds what do all the chained models do then? Why are they there? Because from that moment on those chained are completel gone. They could even be gc'ed So this only works if getObject from them

Re: Component.wrap and IChainingModel

2007-11-06 Thread Johan Compagner
I don't know the exact details of your model hierachy and where you use them in your components. But am i right that you do sorting in memory? So 1 model is loading the rows another model is sorting the rows? and another is doing X? But what do you give to the component then? And why must is

Re: Component.wrap and IChainingModel

2007-11-06 Thread ChuckDeal
Johan Compagner wrote: I don't know the exact details of your model hierachy and where you use them in your components. But am i right that you do sorting in memory? So 1 model is loading the rows another model is sorting the rows? and another is doing X? yes, that's it, roughly.