Paulo Gaspar wrote:
>
> Well, it is not a solution for all of my cases. Sometimes I have
> objects with fields that are objects with fields... or arrays...
True.
> Using the methodizer would get require a lot of application side
> coding and have quite some performance impact over the other
> alternative.
Not sure why there would be a performance impact?
> I will take a look around to better understand the performance impact
> of what I am talking about. The way I imagine thinks working, it
> shouldn't be any/much... but I might be wrong.
>
> Have fun,
> Paulo
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Geir
> > Magnusson Jr.
> >
> > Paulo Gaspar wrote:
> > >
> > > For simple stuff I get lazy and use simple public fields instead of
> > > bean properties. And I like that. For many things it is not worth
> > > implementing all the gets and sets.
> >
> > Ugh. How about just using org.apache.velocity.util.FieldMethodizer?
> >
> > A little class used like :
> >
> > context.put("myclass", new FieldMethodizer( "MyClass" ) );
> >
> > and in template
> >
> > $myclass.publicstring
> >
> > (or whatever your public static fields are called...)
> >
> > >
> > > Not something I would want to impose as standard. WebMacro accepts it
> > > but I seems not to work with Velocity. For much of my stuff, I would
> > > also like discovery to be completely case insensitive.
> >
> > Discovery is now case insensitive, except for the FieldMethodizer, and
> > you might want to modify that and contribute it... If we are really 100%
> > supporting case insensitivity, the the FieldMethodizer should be the
> > same, eh?
> >
> > > But this would raise problems as those raised by Jon and so. So, I am
> > > not suggesting it to be part of Velocity's standard discovery.
> > >
> > > So, what about plugable discovery?
> > > =:o)
> >
> > Before we consider that, does the above solve your problems?
> > Pluggable discovery sounds slow, and Vel isn't going anywhere big
> > unless we get to JSP-like performance.
> >
> > geir
> >
> > >
> > > Paulo
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Geir
> > > > Magnusson Jr.
> > > > Sent: Sunday, February 04, 2001 21:38
> > > >
> > > > Paulo Gaspar wrote:
> > > > >
> > > > > What about a plugable discovery mechanism?
> > > > >
> > > > > I want to volunteer to implement something like that since I
> > > > have a couple
> > > > > of discovery needs that I would not want to impose on other people.
> > > >
> > > > Like what?
> >
> > --
> > Geir Magnusson Jr. [EMAIL PROTECTED]
> > Velocity : it's not just a good idea. It should be the law.
> > http://jakarta.apache.org/velocity
> >
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity