Re: [Wicket-user] Playing with models:)/wicket.extensions.markup.html.form.palette.Palette;

2006-07-18 Thread Nino Wael








Ill like to take
you up on the discussion.





I see the following pros
and cons with this approach:



Pro setObject:

Allows the user to
implement logic into the model If so desired


 Special conversions to satishfy wicket components needs, for
 example, wicket component needs one list but you have three, so join them
 in the get operator and split them in the set 
 Logic, etc disable other components, notify 
 Hold the standard implicitly directed by having a set object method
 Feels the right wayJ


Con setObject:


 Performance could be slightly improved?




I do think that that
using setObject on the model is something that always should be done; it
creates a lot of flexibility and why have setObject if not to use it, if not it
will only cause confusion.



-regards Nino











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





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 modelcontents. 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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user










-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Playing with models:)/wicket.extensions.markup.html.form.palette.Palette;

2006-07-18 Thread Johan Compagner
yes you are right.But in 1.2 this couldn't be done because of some code that was sitting in the way (modelChanging/changed double called and so on)in 2.0 we pretty much have fixed that part i believe. now. Have to look at it further.
johanOn 7/18/06, Nino Wael [EMAIL PROTECTED] wrote:














I'll like to take
you up on the discussion.





I see the following pros
and cons with this approach:



Pro setObject:

Allows the user to
implement logic into the model If so desired


 Special conversions to satishfy wicket components needs, for
 example, wicket component needs one list but you have three, so join them
 in the get operator and split them in the set 
 Logic, etc disable other components, notify …
 Hold the standard implicitly directed by having a set object method
 Feels the right way
J


Con setObject:


 Performance could be slightly improved?




I do think that that
using setObject on the model is something that always should be done; it
creates a lot of flexibility and why have setObject if not to use it, if not it
will only cause confusion.



-regards Nino











From:

[EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
]
On Behalf Of Igor Vaynberg
Sent: 17. juli 2006 17:32
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Playing
with models:)/wicket.extensions.markup.html.form.palette.Palette; 





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 modelcontents. 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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user












-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Playing with models:) / wicket.extensions.markup.html.form.palette.Palette;

2006-07-17 Thread Eelco Hillenius

 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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Playing with models:) /wicket.extensions.markup.html.form.palette.Palette;

2006-07-17 Thread Nino Wael
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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Playing with models:) /wicket.extensions.markup.html.form.palette.Palette;

2006-07-17 Thread Igor Vaynberg
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 callCollection c=model.getObject();c.clear();//refill c
model.setObject(c); == NOOPand also in wicket there is a guardcomponent.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 HilleniusSent: 17. juli 2006 12:14To: 
wicket-user@lists.sourceforge.netSubject: 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 modelcontents. Or ifyou call setObject explicitly of course :() Typically, a componentupdate 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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user