velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: Bean Introspection
Date Fri, 25 Aug 2006 23:35:24 GMT
Good point.  Probably should be left off by default then.  I'm still
thinking it'd be nice to add the PublicFieldUberspect to the core
distribution there.

On 8/25/06, Barbara Baughman <baughman@utdallas.edu> wrote:
> There could be public constants within the system that are used within
> the JVM, but the programmer never meant to make them available to
> outsiders.  Things like allowable minimums and maximums, etc. may be
> intended to be rather private.
>
> Barbara Baughman
> X2157
>
> On Fri, 25 Aug 2006, Nathan Bubna wrote:
>
> > Well, I think the idea is that if a programmer specifically designates
> > a field as public, then that should count as specifically designating
> > it for web designer use.  I don't see that as entirely unreasonable.
> > Also, if the field lookup the were the last option checked, then i
> > believe adding it to "basic Velocity" would only potentially break
> > places where $foo.bar formerly rendered as $foo.bar.  Seems unlikely.
> >
> > Still, if nothing else, we already have the FieldMethodizer in the
> > distribution.  We could always add the PublicFieldUberspect to the
> > core and not use it as the default.  Then it is a simple configuration
> > change away from those who do want it.
> >
> > Anyway, i'm not likely to ever use this myself nor ever be bothered by
> > its presence, so i could really go either way. :)
> >
> > On 8/25/06, Barbara Baughman <baughman@utdallas.edu> wrote:
> > > But this would NOT be backwards compatible.  It is quite possible to
> > > have public fields as a convenience for programs running within the
> > > JVM, but it would not be desirable to provide access to a web
> > > designer.  Velocity is based on a philosophy that the web designer
> > > will only have access to information that is specifically designated
> > > for their use.
> > >
> > > So you can use a tool, but I'm hoping basic Velocity would never
> > > incorporate this.
> > >
> > > Barbara Baughman
> > > X2157
> > >
> > > On Sat, 26 Aug 2006, Gyanesh M Khanolkar wrote:
> > >
> > > > Hi,
> > > >
> > > >
> > > >
> > > > I have read in many forums for requests to read public fields ALSO incase
> > > > the getters are missing. But it seems we are still going by the JavaBean
> > > > specification which allows us to access the property ONLY via a getter
> > > > variable.
> > > >
> > > >
> > > >
> > > > Preferably we would want to avoid the painful getters as it bloats up
our
> > > > already existing code.
> > > >
> > > >
> > > >
> > > > Would it be possible for you to reconsider this approach where
> > > > $UserObj.FirstName will check with the getters : getFirstName() /
> > > > getfirstName() and if both were not found, then it accesses the public
> > > > variable FirstName.
> > > >
> > > >
> > > >
> > > > Introduction of this feature would be of great help as it helps us to
reduce
> > > > writing additional code which is often of no use.
> > > >
> > > >
> > > >
> > > > Regards
> > > >
> > > > Gyanesh
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message