Usually Hibernate works all right for me with copies of Collections, but maybe it depends on the mapping. It's probably not as fast at dirty checking either.

Anyway, if the bracketing calls to modelChanging / modelChanged are important, someone should put them in there. Can they be nested? If not then the setModelObject call will have to be removed and the new Collection case handled specifically.

Nathan

Johan Compagner wrote:
if there was no collection to begin with the setModelObject() wil work.
(Ahh... yes.)

It has to act on it directly i don't see another way to do it.
And i can't just set a new Collection i think because that could be a hibernate collection
that is looking at its contents to do something with it.
And i don't know exactly what type it is i get. It is a Collection (a List most likely) Now if nothing is returned i just put in a ArrayList (don't know a better solution)

I could call modelChanging/modelChanged in that method right before the clear and before the setmodelobject.

johan


On 10/25/05, *Nathan Hamblen* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    In 1.1 rc2, ListMultipleChoice.updateModel() acts a little funny. It
    gets a reference to a Collection in line 282, then operates on it
    directly. First it clears it, then it adds things back.

    At line 316 it calls setModelObject(selectedValues), but that
    doesn't do
    anything because the comparator will return that the object is equal to
    the existing model (it's the same object).

    I'm not sure how important the skipped call to modelChanging is, but it
    seems weird to be calling setModelObject when nothing will ever happen
    there as far as I can tell.

    Nathan



    -------------------------------------------------------
    This SF.Net email is sponsored by the JBoss Inc.
    Get Certified Today * Register for a JBoss Training Course
    Free Certification Exam for All Training Attendees Through End of 2005
    Visit http://www.jboss.com/services/certification for more information
    _______________________________________________
    Wicket-user mailing list
    Wicket-user@lists.sourceforge.net
    <mailto:Wicket-user@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/wicket-user
    <https://lists.sourceforge.net/lists/listinfo/wicket-user>





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to