On 8/25/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> On 8/25/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > i think that is a foolish argument as you are assuming property model
> should
> > only work on _beans_
> > it is perfectly normal to do something like this:
> >
> > class data { public String name; public int age; }
>
> Yes, I hope you didn't really think that I would be against using
> public fields directly were you?!


well, this is what you said:

"Maybe we could do something in between. If the target of a property
model is a component, the model can work on the member directly
(should first try *any* setter and if none is available, use the
field), but if the target is not, it should only work via getters and
setters."

> and wicket should work with this. if this data object is a private inner
> of
> > something and is only used there wth is the point of creating
> > getters/setters?
>
> Because that confirms to the bean spec and to what probably 90% of
> people would initially expect.


yeah, well, not everyone likes that spec. swt uses public fields and seems
to work just fine.

> so our property model should work like this:
> >
> > always try setter/getter first, if not fallback onto the field.
> >
> > i dont really see a danger of propertymodel accessing private members
> > because you can do it yourself if you wanted - and in fact you ARE doing
> it
> > yourself by specifying that property path.
>
> That is a ridiculous statement.


how do you mean? are you saying that  propertymodel has some special jvm
magic that can access fields you otherwise could not? my point is...how do
you even know the path to the private field unless you already did some
poking around, or it is your own code.

-igor


Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to