yeah, but you are forgetting that you will also need the compound variant,
blah blah. before you know it you have replicated a bunch of the hierarchy.
like i said, lets have a vote, propose as many variants of this as you want
and we can see where it goes/what people prefer.

-igor


On 8/28/07, Kent Tong <[EMAIL PROTECTED]> wrote:
>
>
>
>
> igor.vaynberg wrote:
> >
> > cmon, there are plenty of things you can abuse in wicket, or any other
> > framework. that is just the nature of the beast. as framework developers
> > we
> > put out features and hope that our users know how to use them
> responsibly.
> > we cannot continuously cater to newbie users, we have to cater to power
> > users as well - and that sometimes means making things that newbie users
> > might think unclean available anyways so power users can use them
> easily.
> > having two property models might work but it just adds clutter.
> >
>
> Having a more obscurely located PrivateFieldModel is exactly catering to
> power
> users, while minimizing the chance of abuse by newbies. So both newbies
> and
> power users are catered to.
>
> In fact, I am thinking about having an SelfPropertyModel instead which
> will always try to access the properties and private fields of the model
> itself. In the desired usage, one should create an anonymous subclass of
> SelfPropertyModel that has the component as the enclosing instance,
> SelfPropertyModel will work on that component too. Obviously the
> constructor of SelfPropertyModel will only take the name of the property,
> but not a object (nor another model), it will truly only work on itself,
> its
> intended purpose will be clear and it can't be *easily* abused.
>
> public class NamePanel extends Panel {
>   private String firstName;
>   private String lastName;
>
>   public NamePanel() {
>     add(new TextField("firstName", new SelfPropertyModel("firstName")
> {}));
>     ...
>   }
> }
>
>
> igor.vaynberg wrote:
> >
> > we are going about this in circles, so what i propose is that someone
> who
> > really cares about this to put out a vote.
> >
> > -igor
> >
>
> I am fine with it (even though I am learning more and more about this
> issue
> in the process).
> --
> View this message in context:
> http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12379273
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to