But you are writting the book so .... :)
johan
On 1/20/06, Eelco Hillenius <
[EMAIL PROTECTED]> wrote:
What the goal of these nested models is, is for users to save a lot of
repetitive code. I started out being not in favor of this construct
because I was afraid that a lot of people would have difficulty
understanding it. Alas, it seems a lot of people have. But, the code
you save is really worth having the construction. Maybe we shouldn't
promote it too much with our beginner tutorials for the sake of
keeping things easy.
For instance:
Person p = new Person();
setModel(new Model(p);
this line:
add(new TextField("name");
could be written as:
add(new TextField("name", new PropertyModel(p, "name"));
As you can see from above, the first line looks much nicer and the
second is quite verbose. But the first line also is quite magical,
while the second should be easy to understand.
Eelco
On 1/20/06, Rosenstrauch, David <[EMAIL PROTECTED]> wrote:
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto: [EMAIL PROTECTED]]On Behalf
> Of Johan Compagner
> Sent: Friday, January 20, 2006 2:05 PM
> To: [email protected]
> Subject: Re: [Wicket-user] RE: span tag clarification
>
>
> Read what igor says in its second point!:
>
> 2) null models have a special meaning. if the component has a null model it
> will try to search up the component hierarchy tree to find a parent with a
> model that implements ICompoundModel and will then use that model as its
> own. this is useful for models like CompoundPropertyModel. see this
> discussion for details:
> http://www.mail-archive.com/[email protected]/msg08877.html
>
> [Rosenstrauch, David]
> Well, fair enough.
>
> Only thing I would say is that IMO I like frameworks that "make easy things
> easy, and difficult things possible". Seems to me that usability-wise, this
> isn't really optimized to make the easy case easy.
>
> Just my $0.02.
>
> DR
>
>
>
> ==============================================================================
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
>
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ==============================================================================
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
