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 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, which could result in an unsorted list. In the order I specified, the item would get appeneded and then the sort would take place.
Dmitry Kandalov wrote: > >> I was able to make a Model that implements IChainingModel, >> IComponentAssignmentModel, and IWrappedModel that follows the chain until >> it either encounters a IComponentAssignmentModel or exhausts the chain. >> If >> it found a IComponentAssignmentModel, then it calls wrapOnAssignment and >> calls setChainedModel on the model containing the >> IComponentAssignmentModel >> to get it back into the hierarchy. >> >> It appears to be working for me now. If you are interested, I can post >> the >> code. > > I'd like to. > > > Dima > I don't have time right now to make a sample app, but this should be enough source for you to see the impl. http://www.nabble.com/file/p13654020/chained_model_source.zip chained_model_source.zip Chuck -- View this message in context: http://www.nabble.com/Component.wrap-and-IChainingModel-tf4759201.html#a13654020 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]