components whose model is backed by a collection do not always call setobject() because they work on the collection directly so there is no need to call

Collection c=model.getObject();
c.clear();
//refill c
model.setObject(c); <== NOOP

and also in wicket there is a guard

component.setObject(c) {
   if (c.equals(model.getobject()) {
     //noop
   } else { //clone for version tracking; model.setObject (c); }
}

the above saves on unnecessary cloning.

just a few things to be aware of, whether or not we should call setobject() anyways is still up for discussion.

i kinda think we should even though sometimes the objects are the same.

-Igor

    

On 7/17/06, Nino Wael <[EMAIL PROTECTED]> wrote:
Strange then, it seems as the extension palette does not update on a submit? Does it somehow detach from its model?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Eelco Hillenius
Sent: 17. juli 2006 12:14
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Playing with models:) /wicket.extensions.markup.html.form.palette.Palette;

>
> When is setObject supposed to get called, Cause I only see it get called during
> construct?

Whenever a (form)component has to update it's model  contents. Or if
you call setObject explicitly of course :() Typically, a component
update is done by Form, which visits all it's children and calls
updateModel on them.

Eelco


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to