|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 - 4 - 5 | Next > |
|
|
CompoundModel based on proxiesOne of our more clever developers created a CompoundPropertyModel that
uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModel<Customer> model = new SharedPropertyModel<Customer>(customer); this.setModel(model); FormComponent firstName = new CustomerNameField("firstName").setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField("lastName").setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField("address1").setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField("address2"); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField("city"); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: CompoundModel based on proxiesvery nice!
-----Original Message----- From: Scott Swank [mailto:scott.swank@...] Sent: Wednesday, February 06, 2008 12:57 PM To: Wicket User List Subject: CompoundModel based on proxies One of our more clever developers created a CompoundPropertyModel that uses a cglib proxy to strongly bind the mutators to the model. It looks like this: SharedPropertyModel<Customer> model = new SharedPropertyModel<Customer>(customer); this.setModel(model); FormComponent firstName = new CustomerNameField("firstName").setRequired(true); model.bind(firstName).to().getFirstName(); add(firstName); FormComponent lastName = new CustomerNameField("lastName").setRequired(true); model.bind(lastName).to().getLastName(); add(lastName); FormComponent addr1 = new AddressField("address1").setRequired(true); model.bind(addr1).to().getAddress().getAddress1(); add(addr1); FormComponent addr2 = new AddressField("address2"); model.bind(addr2).to().getAddress().getAddress2(); add(addr2); FormComponent city = new CityField("city"); model.bind(city).to().getAddress().getCity(); add(city); We're happy to share if folk like this approach. N.B. that the .to() call is for readability rather than out of any necessity. Cheers, Scott -- Scott Swank reformed mathematician --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesScott Swank wrote:
> We're happy to share if folk like this approach. N.B. that the .to() > call is for readability rather than out of any necessity. I'm quite interested in this. This looks like it is just crazy and clever enough to be really useful :-) Thanks! Carl-Eric --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesplease share for Wicket 1.4, if cglib's license is permitting, I think
we should add this to core. Martijn On 2/6/08, Scott Swank <scott.swank@...> wrote: > One of our more clever developers created a CompoundPropertyModel that > uses a cglib proxy to strongly bind the mutators to the model. It > looks like this: > > SharedPropertyModel<Customer> model = new > SharedPropertyModel<Customer>(customer); > this.setModel(model); > > FormComponent firstName = new > CustomerNameField("firstName").setRequired(true); > model.bind(firstName).to().getFirstName(); > add(firstName); > > FormComponent lastName = new CustomerNameField("lastName").setRequired(true); > model.bind(lastName).to().getLastName(); > add(lastName); > > FormComponent addr1 = new AddressField("address1").setRequired(true); > model.bind(addr1).to().getAddress().getAddress1(); > add(addr1); > > FormComponent addr2 = new AddressField("address2"); > model.bind(addr2).to().getAddress().getAddress2(); > add(addr2); > > FormComponent city = new CityField("city"); > model.bind(city).to().getAddress().getCity(); > add(city); > > We're happy to share if folk like this approach. N.B. that the .to() > call is for readability rather than out of any necessity. > > Cheers, > Scott > > -- > Scott Swank > reformed mathematician > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesif not cglib i can rewrite that with asm, its license is very liberal
and we can even embed it into wicket - at least thats what ive done for salve to avoid version conflicts with other asm versions. -igor On Feb 6, 2008 1:04 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > please share for Wicket 1.4, if cglib's license is permitting, I think > we should add this to core. > > Martijn > > > On 2/6/08, Scott Swank <scott.swank@...> wrote: > > One of our more clever developers created a CompoundPropertyModel that > > uses a cglib proxy to strongly bind the mutators to the model. It > > looks like this: > > > > SharedPropertyModel<Customer> model = new > > SharedPropertyModel<Customer>(customer); > > this.setModel(model); > > > > FormComponent firstName = new > > CustomerNameField("firstName").setRequired(true); > > model.bind(firstName).to().getFirstName(); > > add(firstName); > > > > FormComponent lastName = new CustomerNameField("lastName").setRequired(true); > > model.bind(lastName).to().getLastName(); > > add(lastName); > > > > FormComponent addr1 = new AddressField("address1").setRequired(true); > > model.bind(addr1).to().getAddress().getAddress1(); > > add(addr1); > > > > FormComponent addr2 = new AddressField("address2"); > > model.bind(addr2).to().getAddress().getAddress2(); > > add(addr2); > > > > FormComponent city = new CityField("city"); > > model.bind(city).to().getAddress().getCity(); > > add(city); > > > > We're happy to share if folk like this approach. N.B. that the .to() > > call is for readability rather than out of any necessity. > > > > Cheers, > > Scott > > > > -- > > Scott Swank > > reformed mathematician > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.0 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesThe cglib website http://cglib.sourceforge.net/ points here for their
license: http://www.apache.org/foundation/licence-FAQ.html So I don't think there are any issues. :) Are there any issues with attaching a zip file to an e-mail, or would you prefer another means? On Feb 6, 2008 1:06 PM, Igor Vaynberg <igor.vaynberg@...> wrote: > if not cglib i can rewrite that with asm, its license is very liberal > and we can even embed it into wicket - at least thats what ive done > for salve to avoid version conflicts with other asm versions. > > -igor > > > > On Feb 6, 2008 1:04 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > > please share for Wicket 1.4, if cglib's license is permitting, I think > > we should add this to core. > > > > Martijn > > > > > > On 2/6/08, Scott Swank <scott.swank@...> wrote: > > > One of our more clever developers created a CompoundPropertyModel that > > > uses a cglib proxy to strongly bind the mutators to the model. It > > > looks like this: > > > > > > SharedPropertyModel<Customer> model = new > > > SharedPropertyModel<Customer>(customer); > > > this.setModel(model); > > > > > > FormComponent firstName = new > > > CustomerNameField("firstName").setRequired(true); > > > model.bind(firstName).to().getFirstName(); > > > add(firstName); > > > > > > FormComponent lastName = new CustomerNameField("lastName").setRequired(true); > > > model.bind(lastName).to().getLastName(); > > > add(lastName); > > > > > > FormComponent addr1 = new AddressField("address1").setRequired(true); > > > model.bind(addr1).to().getAddress().getAddress1(); > > > add(addr1); > > > > > > FormComponent addr2 = new AddressField("address2"); > > > model.bind(addr2).to().getAddress().getAddress2(); > > > add(addr2); > > > > > > FormComponent city = new CityField("city"); > > > model.bind(city).to().getAddress().getCity(); > > > add(city); > > > > > > We're happy to share if folk like this approach. N.B. that the .to() > > > call is for readability rather than out of any necessity. > > > > > > Cheers, > > > Scott > > > > > > -- > > > Scott Swank > > > reformed mathematician > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > -- > > Buy Wicket in Action: http://manning.com/dashorst > > Apache Wicket 1.3.0 is released > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Scott Swank reformed mathematician --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesI'm quite interested too.
Daniel On 2008-02-06, at 19:27, Carl-Eric Menzel wrote: > Scott Swank wrote: >> We're happy to share if folk like this approach. N.B. that the .to() >> call is for readability rather than out of any necessity. > > I'm quite interested in this. This looks like it is just crazy and > clever enough to be really useful :-) > > Thanks! > Carl-Eric > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesjira, that way you can click the "im donating attachment to the
project through ASL license" checkbox -igor On Feb 6, 2008 1:10 PM, Scott Swank <scott.swank@...> wrote: > The cglib website http://cglib.sourceforge.net/ points here for their > license: http://www.apache.org/foundation/licence-FAQ.html > > So I don't think there are any issues. :) > > Are there any issues with attaching a zip file to an e-mail, or would > you prefer another means? > > > On Feb 6, 2008 1:06 PM, Igor Vaynberg <igor.vaynberg@...> wrote: > > if not cglib i can rewrite that with asm, its license is very liberal > > and we can even embed it into wicket - at least thats what ive done > > for salve to avoid version conflicts with other asm versions. > > > > -igor > > > > > > > > On Feb 6, 2008 1:04 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > > > please share for Wicket 1.4, if cglib's license is permitting, I think > > > we should add this to core. > > > > > > Martijn > > > > > > > > > On 2/6/08, Scott Swank <scott.swank@...> wrote: > > > > One of our more clever developers created a CompoundPropertyModel that > > > > uses a cglib proxy to strongly bind the mutators to the model. It > > > > looks like this: > > > > > > > > SharedPropertyModel<Customer> model = new > > > > SharedPropertyModel<Customer>(customer); > > > > this.setModel(model); > > > > > > > > FormComponent firstName = new > > > > CustomerNameField("firstName").setRequired(true); > > > > model.bind(firstName).to().getFirstName(); > > > > add(firstName); > > > > > > > > FormComponent lastName = new CustomerNameField("lastName").setRequired(true); > > > > model.bind(lastName).to().getLastName(); > > > > add(lastName); > > > > > > > > FormComponent addr1 = new AddressField("address1").setRequired(true); > > > > model.bind(addr1).to().getAddress().getAddress1(); > > > > add(addr1); > > > > > > > > FormComponent addr2 = new AddressField("address2"); > > > > model.bind(addr2).to().getAddress().getAddress2(); > > > > add(addr2); > > > > > > > > FormComponent city = new CityField("city"); > > > > model.bind(city).to().getAddress().getCity(); > > > > add(city); > > > > > > > > We're happy to share if folk like this approach. N.B. that the .to() > > > > call is for readability rather than out of any necessity. > > > > > > > > Cheers, > > > > Scott > > > > > > > > -- > > > > Scott Swank > > > > reformed mathematician > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > -- > > > Buy Wicket in Action: http://manning.com/dashorst > > > Apache Wicket 1.3.0 is released > > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > > -- > Scott Swank > reformed mathematician > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxieshttps://issues.apache.org/jira/browse/WICKET-1327
On Feb 6, 2008 1:12 PM, Igor Vaynberg <igor.vaynberg@...> wrote: > jira, that way you can click the "im donating attachment to the > project through ASL license" checkbox > > -igor > > > > On Feb 6, 2008 1:10 PM, Scott Swank <scott.swank@...> wrote: > > The cglib website http://cglib.sourceforge.net/ points here for their > > license: http://www.apache.org/foundation/licence-FAQ.html > > > > So I don't think there are any issues. :) > > > > Are there any issues with attaching a zip file to an e-mail, or would > > you prefer another means? > > > > > > On Feb 6, 2008 1:06 PM, Igor Vaynberg <igor.vaynberg@...> wrote: > > > if not cglib i can rewrite that with asm, its license is very liberal > > > and we can even embed it into wicket - at least thats what ive done > > > for salve to avoid version conflicts with other asm versions. > > > > > > -igor > > > > > > > > > > > > On Feb 6, 2008 1:04 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > > > > please share for Wicket 1.4, if cglib's license is permitting, I think > > > > we should add this to core. > > > > > > > > Martijn > > > > > > > > > > > > On 2/6/08, Scott Swank <scott.swank@...> wrote: > > > > > One of our more clever developers created a CompoundPropertyModel that > > > > > uses a cglib proxy to strongly bind the mutators to the model. It > > > > > looks like this: > > > > > > > > > > SharedPropertyModel<Customer> model = new > > > > > SharedPropertyModel<Customer>(customer); > > > > > this.setModel(model); > > > > > > > > > > FormComponent firstName = new > > > > > CustomerNameField("firstName").setRequired(true); > > > > > model.bind(firstName).to().getFirstName(); > > > > > add(firstName); > > > > > > > > > > FormComponent lastName = new CustomerNameField("lastName").setRequired(true); > > > > > model.bind(lastName).to().getLastName(); > > > > > add(lastName); > > > > > > > > > > FormComponent addr1 = new AddressField("address1").setRequired(true); > > > > > model.bind(addr1).to().getAddress().getAddress1(); > > > > > add(addr1); > > > > > > > > > > FormComponent addr2 = new AddressField("address2"); > > > > > model.bind(addr2).to().getAddress().getAddress2(); > > > > > add(addr2); > > > > > > > > > > FormComponent city = new CityField("city"); > > > > > model.bind(city).to().getAddress().getCity(); > > > > > add(city); > > > > > > > > > > We're happy to share if folk like this approach. N.B. that the .to() > > > > > call is for readability rather than out of any necessity. > > > > > > > > > > Cheers, > > > > > Scott > > > > > > > > > > -- > > > > > Scott Swank > > > > > reformed mathematician > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > > > -- > > > > Buy Wicket in Action: http://manning.com/dashorst > > > > Apache Wicket 1.3.0 is released > > > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > -- > > Scott Swank > > reformed mathematician > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Scott Swank reformed mathematician --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesThanks! And I always thought: what happens in Vegas, stays in Vegas...
Martijn On 2/6/08, Scott Swank <scott.swank@...> wrote: > https://issues.apache.org/jira/browse/WICKET-1327 > > On Feb 6, 2008 1:12 PM, Igor Vaynberg <igor.vaynberg@...> wrote: > > jira, that way you can click the "im donating attachment to the > > project through ASL license" checkbox > > > > -igor > > > > > > > > On Feb 6, 2008 1:10 PM, Scott Swank <scott.swank@...> wrote: > > > The cglib website http://cglib.sourceforge.net/ points here for their > > > license: http://www.apache.org/foundation/licence-FAQ.html > > > > > > So I don't think there are any issues. :) > > > > > > Are there any issues with attaching a zip file to an e-mail, or would > > > you prefer another means? > > > > > > > > > On Feb 6, 2008 1:06 PM, Igor Vaynberg <igor.vaynberg@...> wrote: > > > > if not cglib i can rewrite that with asm, its license is very liberal > > > > and we can even embed it into wicket - at least thats what ive done > > > > for salve to avoid version conflicts with other asm versions. > > > > > > > > -igor > > > > > > > > > > > > > > > > On Feb 6, 2008 1:04 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > > > > > please share for Wicket 1.4, if cglib's license is permitting, I think > > > > > we should add this to core. > > > > > > > > > > Martijn > > > > > > > > > > > > > > > On 2/6/08, Scott Swank <scott.swank@...> wrote: > > > > > > One of our more clever developers created a CompoundPropertyModel that > > > > > > uses a cglib proxy to strongly bind the mutators to the model. It > > > > > > looks like this: > > > > > > > > > > > > SharedPropertyModel<Customer> model = new > > > > > > SharedPropertyModel<Customer>(customer); > > > > > > this.setModel(model); > > > > > > > > > > > > FormComponent firstName = new > > > > > > CustomerNameField("firstName").setRequired(true); > > > > > > model.bind(firstName).to().getFirstName(); > > > > > > add(firstName); > > > > > > > > > > > > FormComponent lastName = new CustomerNameField("lastName").setRequired(true); > > > > > > model.bind(lastName).to().getLastName(); > > > > > > add(lastName); > > > > > > > > > > > > FormComponent addr1 = new AddressField("address1").setRequired(true); > > > > > > model.bind(addr1).to().getAddress().getAddress1(); > > > > > > add(addr1); > > > > > > > > > > > > FormComponent addr2 = new AddressField("address2"); > > > > > > model.bind(addr2).to().getAddress().getAddress2(); > > > > > > add(addr2); > > > > > > > > > > > > FormComponent city = new CityField("city"); > > > > > > model.bind(city).to().getAddress().getCity(); > > > > > > add(city); > > > > > > > > > > > > We're happy to share if folk like this approach. N.B. that the .to() > > > > > > call is for readability rather than out of any necessity. > > > > > > > > > > > > Cheers, > > > > > > Scott > > > > > > > > > > > > -- > > > > > > Scott Swank > > > > > > reformed mathematician > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Buy Wicket in Action: http://manning.com/dashorst > > > > > Apache Wicket 1.3.0 is released > > > > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: users-unsubscribe@... > > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > > > > > > > > -- > > > Scott Swank > > > reformed mathematician > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > > -- > Scott Swank > reformed mathematician > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesNo problem. I didn't even write a line of it. :)
On Feb 6, 2008 2:30 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > Thanks! And I always thought: what happens in Vegas, stays in Vegas... > > > Martijn --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesOn 2/7/08, Scott Swank <scott.swank@...> wrote:
> No problem. I didn't even write a line of it. :) Just for the record keeping: are you allowed to grant us the use of said model? Typically that should be done by the original copyright holder. Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesI have his approval, but I can get him if you like. Let me know either way.
On Feb 6, 2008 3:22 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > On 2/7/08, Scott Swank <scott.swank@...> wrote: > > No problem. I didn't even write a line of it. :) > > Just for the record keeping: are you allowed to grant us the use of > said model? Typically that should be done by the original copyright > holder. > > Martijn > > -- > > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.0 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Scott Swank reformed mathematician --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesIf he could leave a comment on the issue that would be great.
If he has more ideas like this, get him to open a JIRA account :) Martijn On 2/7/08, Scott Swank <scott.swank@...> wrote: > I have his approval, but I can get him if you like. Let me know either way. > > On Feb 6, 2008 3:22 PM, Martijn Dashorst <martijn.dashorst@...> wrote: > > On 2/7/08, Scott Swank <scott.swank@...> wrote: > > > No problem. I didn't even write a line of it. :) > > > > Just for the record keeping: are you allowed to grant us the use of > > said model? Typically that should be done by the original copyright > > holder. > > > > Martijn > > > > -- > > > > Buy Wicket in Action: http://manning.com/dashorst > > Apache Wicket 1.3.0 is released > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > > -- > Scott Swank > reformed mathematician > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxieslike BoundCompoundPropertyModel, but safer. i think this almost might be too clever as it sacrifices some intuitiveness. also, it's filling in for a missing java feature. this should really be:
boundModel.bind(component, firstName.property) (where .property, .field and .method are long-missing declarative reflections like .class) it does make me think we could be doing more with CGLIB in general. our model classes ought to be able to detect model changes better using proxies, for example.
|
|
|
Re: CompoundModel based on proxiesanother thing that occurs to me is that perhaps the method would be more generalized we basically made a fill-in for the missing .property feature. we could have a method like Reflection.property(expr) return a property expression string (or a compiled version of it). this makes me think there's a missing reflection package in java in general...
|
|
|
Re: CompoundModel based on proxiesi disagree. i dont think we should be doing more with cglib in core or
any other bytecode magic. have you ever tried to walk code that uses bytecode generation? its a nightmare. one of my favorite things about wicket is that it is just java and its easy as hell to debug. im not really against putting something like this into extensions, or even having a new wicket-bytecode/codegen/whatever package that contains things like these... -igor On Feb 6, 2008 5:23 PM, Jonathan Locke <jonathan.locke@...> wrote: > > like BoundCompoundPropertyModel, but safer. i think this almost might be too > clever as it sacrifices some intuitiveness. also, it's filling in for a > missing java feature. this should really be: > > boundModel.bind(component, firstName.property) > > (where .property, .field and .method are long-missing declarative > reflections like .class) > > it does make me think we could be doing more with CGLIB in general. our > model classes ought to be able to detect model changes better using proxies, > for example. > > > > Scott Swank wrote: > > > > One of our more clever developers created a CompoundPropertyModel that > > uses a cglib proxy to strongly bind the mutators to the model. It > > looks like this: > > > > SharedPropertyModel<Customer> model = new > > SharedPropertyModel<Customer>(customer); > > this.setModel(model); > > > > FormComponent firstName = new > > CustomerNameField("firstName").setRequired(true); > > model.bind(firstName).to().getFirstName(); > > add(firstName); > > > > FormComponent lastName = new > > CustomerNameField("lastName").setRequired(true); > > model.bind(lastName).to().getLastName(); > > add(lastName); > > > > FormComponent addr1 = new AddressField("address1").setRequired(true); > > model.bind(addr1).to().getAddress().getAddress1(); > > add(addr1); > > > > FormComponent addr2 = new AddressField("address2"); > > model.bind(addr2).to().getAddress().getAddress2(); > > add(addr2); > > > > FormComponent city = new CityField("city"); > > model.bind(city).to().getAddress().getCity(); > > add(city); > > > > We're happy to share if folk like this approach. N.B. that the .to() > > call is for readability rather than out of any necessity. > > > > Cheers, > > Scott > > > > -- > > Scott Swank > > reformed mathematician > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > > -- > View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesso you don't support this model then?
|
|
|
Re: CompoundModel based on proxiesi support it in a non-core module
-igor On Feb 6, 2008 5:41 PM, Jonathan Locke <jonathan.locke@...> wrote: > > > so you don't support this model then? > > > > igor.vaynberg wrote: > > > > i disagree. i dont think we should be doing more with cglib in core or > > any other bytecode magic. have you ever tried to walk code that uses > > bytecode generation? its a nightmare. one of my favorite things about > > wicket is that it is just java and its easy as hell to debug. im not > > really against putting something like this into extensions, or even > > having a new wicket-bytecode/codegen/whatever package that contains > > things like these... > > > > -igor > > > > > > On Feb 6, 2008 5:23 PM, Jonathan Locke <jonathan.locke@...> wrote: > >> > >> like BoundCompoundPropertyModel, but safer. i think this almost might be > >> too > >> clever as it sacrifices some intuitiveness. also, it's filling in for a > >> missing java feature. this should really be: > >> > >> boundModel.bind(component, firstName.property) > >> > >> (where .property, .field and .method are long-missing declarative > >> reflections like .class) > >> > >> it does make me think we could be doing more with CGLIB in general. our > >> model classes ought to be able to detect model changes better using > >> proxies, > >> for example. > >> > >> > >> > >> Scott Swank wrote: > >> > > >> > One of our more clever developers created a CompoundPropertyModel that > >> > uses a cglib proxy to strongly bind the mutators to the model. It > >> > looks like this: > >> > > >> > SharedPropertyModel<Customer> model = new > >> > SharedPropertyModel<Customer>(customer); > >> > this.setModel(model); > >> > > >> > FormComponent firstName = new > >> > CustomerNameField("firstName").setRequired(true); > >> > model.bind(firstName).to().getFirstName(); > >> > add(firstName); > >> > > >> > FormComponent lastName = new > >> > CustomerNameField("lastName").setRequired(true); > >> > model.bind(lastName).to().getLastName(); > >> > add(lastName); > >> > > >> > FormComponent addr1 = new > >> AddressField("address1").setRequired(true); > >> > model.bind(addr1).to().getAddress().getAddress1(); > >> > add(addr1); > >> > > >> > FormComponent addr2 = new AddressField("address2"); > >> > model.bind(addr2).to().getAddress().getAddress2(); > >> > add(addr2); > >> > > >> > FormComponent city = new CityField("city"); > >> > model.bind(city).to().getAddress().getCity(); > >> > add(city); > >> > > >> > We're happy to share if folk like this approach. N.B. that the .to() > >> > call is for readability rather than out of any necessity. > >> > > >> > Cheers, > >> > Scott > >> > > >> > -- > >> > Scott Swank > >> > reformed mathematician > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: users-unsubscribe@... > >> > For additional commands, e-mail: users-help@... > >> > > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscribe@... > >> For additional commands, e-mail: users-help@... > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > > > -- > View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325860.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: CompoundModel based on proxiesThere are additional considerations (at least in this implementation),
all of which should be familiar to users of Hibernate or any proxy-based framework. 1) classes may not be final 2) methods may not be final 3) classes must have a no-method constructor Some folk may not be happy with these restrictions. - Scott On Feb 6, 2008 5:43 PM, Igor Vaynberg <igor.vaynberg@...> wrote: > i support it in a non-core module > > -igor > > > > On Feb 6, 2008 5:41 PM, Jonathan Locke <jonathan.locke@...> wrote: > > > > > > so you don't support this model then? > > > > > > > > igor.vaynberg wrote: > > > > > > i disagree. i dont think we should be doing more with cglib in core or > > > any other bytecode magic. have you ever tried to walk code that uses > > > bytecode generation? its a nightmare. one of my favorite things about > > > wicket is that it is just java and its easy as hell to debug. im not > > > really against putting something like this into extensions, or even > > > having a new wicket-bytecode/codegen/whatever package that contains > > > things like these... > > > > > > -igor > > > > > > > > > On Feb 6, 2008 5:23 PM, Jonathan Locke <jonathan.locke@...> wrote: > > >> > > >> like BoundCompoundPropertyModel, but safer. i think this almost might be > > >> too > > >> clever as it sacrifices some intuitiveness. also, it's filling in for a > > >> missing java feature. this should really be: > > >> > > >> boundModel.bind(component, firstName.property) > > >> > > >> (where .property, .field and .method are long-missing declarative > > >> reflections like .class) > > >> > > >> it does make me think we could be doing more with CGLIB in general. our > > >> model classes ought to be able to detect model changes better using > > >> proxies, > > >> for example. > > >> > > >> > > >> > > >> Scott Swank wrote: > > >> > > > >> > One of our more clever developers created a CompoundPropertyModel that > > >> > uses a cglib proxy to strongly bind the mutators to the model. It > > >> > looks like this: > > >> > > > >> > SharedPropertyModel<Customer> model = new > > >> > SharedPropertyModel<Customer>(customer); > > >> > this.setModel(model); > > >> > > > >> > FormComponent firstName = new > > >> > CustomerNameField("firstName").setRequired(true); > > >> > model.bind(firstName).to().getFirstName(); > > >> > add(firstName); > > >> > > > >> > FormComponent lastName = new > > >> > CustomerNameField("lastName").setRequired(true); > > >> > model.bind(lastName).to().getLastName(); > > >> > add(lastName); > > >> > > > >> > FormComponent addr1 = new > > >> AddressField("address1").setRequired(true); > > >> > model.bind(addr1).to().getAddress().getAddress1(); > > >> > add(addr1); > > >> > > > >> > FormComponent addr2 = new AddressField("address2"); > > >> > model.bind(addr2).to().getAddress().getAddress2(); > > >> > add(addr2); > > >> > > > >> > FormComponent city = new CityField("city"); > > >> > model.bind(city).to().getAddress().getCity(); > > >> > add(city); > > >> > > > >> > We're happy to share if folk like this approach. N.B. that the .to() > > >> > call is for readability rather than out of any necessity. > > >> > > > >> > Cheers, > > >> > Scott > > >> > > > >> > -- > > >> > Scott Swank > > >> > reformed mathematician > > >> > > > >> > --------------------------------------------------------------------- > > >> > To unsubscribe, e-mail: users-unsubscribe@... > > >> > For additional commands, e-mail: users-help@... > > >> > > > >> > > > >> > > > >> > > >> -- > > >> View this message in context: > > >> http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325663.html > > >> Sent from the Wicket - User mailing list archive at Nabble.com. > > >> > > >> > > >> > > >> --------------------------------------------------------------------- > > >> To unsubscribe, e-mail: users-unsubscribe@... > > >> For additional commands, e-mail: users-help@... > > >> > > >> > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@... > > > For additional commands, e-mail: users-help@... > > > > > > > > > > > > > -- > > View this message in context: http://www.nabble.com/CompoundModel-based-on-proxies-tp15317807p15325860.html > > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- Scott Swank reformed mathematician --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| < Prev | 1 - 2 - 3 - 4 - 5 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |