Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-22 Thread Scott Swank
In the description of the PropertyModel there is an implicit example, that might as well be spelled out. personForm.add(new RequiredTextField("personName", new PropertyModel(person, "name"))); I also changed the id of the field to personName to distinguish it from the property: name. On 1/22/

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-22 Thread Jonathan Locke
We did already break the model contract with 1.2/1.3... would get/setObject->get/setValue be a huge hassle? Or am I spacing something here? Jonathan Locke wrote: > > > Made a few more changes. I think it's getting shorter/better. > > My one regret looking at this documentation is that I

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-22 Thread Jonathan Locke
Made a few more changes. I think it's getting shorter/better. My one regret looking at this documentation is that I wish IModel.get/setObject were actually IModel.get/setValue. Or was there some crazy reason we didn't do this? It would be much easier and more natural to talk about a model's

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-22 Thread Igor Vaynberg
nice work! -igor On 1/22/07, Loren Rosen <[EMAIL PROTECTED]> wrote: I've saved my rewritten version. (See http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models ) Comments by everyone from experts to complete newbies are most welcome. Doubtless there are things that ar

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-22 Thread Jonathan Locke
Nice work. I made a few small changes and rephrased the first paragraph to be even more specific. Maybe it could be tweaked a little more, but I think this sums it up better now: "In Wicket, a model holds a value for a component to display and/or edit. How exactly this value is held is determi

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-22 Thread Eelco Hillenius
Looks great, thanks a lot. I added a few notes about models in Wicket 2.0. If other people have more such notes they would be welcome. Eelco On 1/22/07, Loren Rosen <[EMAIL PROTECTED]> wrote: > > I've saved my rewritten version. (See > http://cwiki.apache.org/confluence/display/WICKET/Working+wi

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-22 Thread Loren Rosen
I've saved my rewritten version. (See http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models) Comments by everyone from experts to complete newbies are most welcome. Doubtless there are things that are confusing or flat-out wrong. In addition to rephrasing or rewriting a lot

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-16 Thread Igor Vaynberg
On 1/16/07, Loren Rosen <[EMAIL PROTECTED]> wrote: > all models are detachable. This is true in the sense that they all implement IDetachable. But some models don't do anything interesting when detached. It would be nice to be able to give some simple direction to developers who have a large mo

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-16 Thread Loren Rosen
>the StringResourceModel pulls the >data, where as if you do new Model(getLocalizer()..) the value will never >change. This reinforces my thinking that the page needs to discuss dynamic vs. static models. >StringResourceModel also uses the localizer of the component it is attached >to, so depe

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-16 Thread Igor Vaynberg
On 1/16/07, Loren Rosen <[EMAIL PROTECTED]> wrote: I'm working on this now, and have a few questions: When would you use StringResourceModel instead of getting a string from Localizer and creating a model from that? the two operations are equivalent, however the StringResourceModel pulls th

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-16 Thread Loren Rosen
I'm working on this now, and have a few questions: When would you use StringResourceModel instead of getting a string from Localizer and creating a model from that? What's the attach and detach behavior of the property models? Why does IModel extend IDetachable? One might expect only AbstractDe

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-15 Thread Eelco Hillenius
Yeah, go for it. That'll be much appreciated. Eelco On 1/15/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: go ahead and edit the page...the wiki is versioned i think so we can always roll back. when you are done with the majority let us know and we will review the changes. -igor On 1/15/07,

Re: [Wicket-user] revising the "Working with Wicket models" page

2007-01-15 Thread Igor Vaynberg
go ahead and edit the page...the wiki is versioned i think so we can always roll back. when you are done with the majority let us know and we will review the changes. -igor On 1/15/07, Loren Rosen <[EMAIL PROTECTED]> wrote: When I first started using Wicket I found the information on models

[Wicket-user] revising the "Working with Wicket models" page

2007-01-15 Thread Loren Rosen
When I first started using Wicket I found the information on models a little hard to follow. So now I'd like to revise the "Working with Wicket models" wiki page (http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models) to improve this. I'd be happy to outline what I think sh