The data provider is kept as the model because that is where the sorting
state lives and that needs to be versioned. I need to refactor that out of
the dataprovider looks like.


I see.

Maybe an interface ISortOrderProvider which is exactly like ISortableDataProvider but does not extend IDataProvider. The interface could than be implemented by special Components directly (ie SortableHeader). And a DataProvider which supports sorting uses an instance of this interface to sort its data. I thing this would also decouple the sorting from DataView etc.

Christian

-Igor

On 12/3/05, Christian Essl <[EMAIL PROTECTED]> wrote:

On Fri, 2 Dec 2005 22:51:05 +0100, Johan Compagner <[EMAIL PROTECTED]>
wrote:

> Maybe we should build something that it is easier for models to version
> themselfs. Like an interface IVersionable with a method Serializeable
> getVersionData()
> Which a model can implement. And then we don't store the complete model
> but
> only that data.

If I understand right than a IModel which does not implement IVersionable
does not get stored in the version history? I think this would be good,
because the current situation is confusing.

Concerning DataView I'd say that when a the IDataProvider is given
directly in the constructor. It should not be stored as the model of
DataView but kept in an instancefield, because in nearly all cases it will
be a pull-model. If you need versioning than you can always wrap it in a
model.

Christian

>
> johan
>
>
> On 12/2/05, Nathan Hamblen <[EMAIL PROTECTED]> wrote:
>>
>> This came up before when I was trying to track down why reversing the
>> sort order of a DataView was bringing down my test application.
>> (http://thread.gmane.org/gmane.comp.java.wicket.user/4309) It turned
out
>> that the page versioning code was serializing the entire view
hierarchy,
>> recursively, because of anonymous model classes that contained pointers
>> back into the view.
>>
>> The consensus was that you would have to turn off page versioning if
you
>> wanted an anonymous IModel. Is this still the case? I'm just now
>> noticing anonymous IModels becoming sort of recommended. Does that mean
>> than page versioning is not recommended anymore?
>>
>> I'll admit don't even understand how versioning is supposed to work.
>> DataView sorting seems to be one of the few things that triggers it.
>> I've got forms updating models all over the place and nary a version to
>> be seen. So, I just turn it OFF then, and anonymously subclass IModel
to
>> my heart's content?
>>
>> Nathan
>>
>> Christian Essl wrote:
>> > On Thu, 1 Dec 2005 14:24:20 -0500, Andrew Berman <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> >> Honestly, I don't think there ever was a Spring Integration
>> problem.  I
>> >> think people were just looking for a cookie-cutter approach to using
>> >> Spring
>> >> within Wicket. It's actually quite easy to do without using any of
>> the
>> >> Spring stuff that Igor and others wrote, but it's always a good
thing
>> to
>> >> have a common approach that everyone can follow.
>> >
>> > Honestly, I think Igor did a good job: It is just easier and more
>> > natural to write over and over again:
>> >
>> > new HibernateModel(obj,_dao);
>> >
>> > than
>> >
>> > new HibernateModel(obj, new Model(){
>> >    getObject(Component comp){
>> >       return ((MyApplication)Appliation.get()).getDAO();
>> >    }
>> > });
>> >
>> > and this is not restricted to HibernateDAOs but to any bean you do
not
>> > want to get serialized whtih your components.
>> >
>> > Christian
>> >
>> >
>> >
>> >
>> >
>> >
>> > ___________________________________________________________ Gesendet
>> von
>> > Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
>> > http://mail.yahoo.de
>> >
>> >
>> >
>> > -------------------------------------------------------
>> > This SF.net email is sponsored by: Splunk Inc. Do you grep through
log
>> > files
>> > for problems? Stop! Download the new AJAX search engine that makes
>> > searching your log files as easy as surfing the  web.  DOWNLOAD
>> SPLUNK!
>> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>> files
>> for problems?  Stop!  Download the new AJAX search engine that makes
>> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>



--
Christian Essl





___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
anmelden: http://mail.yahoo.de



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Christian Essl
        

        
                
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to