yeah, that'd be good. any chance you'd be willing to open a jira
issue about it?
On 7/7/06, jian chen <[EMAIL PROTECTED]> wrote:
Thanks!
I was testing and did find from my experiment that getBar() has higher
precedence than get("Bar").
If this is not already in the Velocity user guide or developer guide, maybe
the guide could be enhanced with this info? This way, it would definitely
clear out some user confusion.
Jian
On 7/7/06, Nathan Bubna <[EMAIL PROTECTED]> wrote:
>
> from a look at the default Uberspect for version 1.4
> (
>
http://svn.apache.org/repos/asf/jakarta/velocity/engine/tags/VEL_1_4/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
> ),
> it would appear that the order of lookup for $foo.bar is:
>
> getbar()
> getBar()
> get("bar")
> isBar()
>
> On 7/7/06, jian chen <[EMAIL PROTECTED]> wrote:
> > Cool, thanks! Now I look at the Velocity user guide and find this:
> >
> > *"$customer.Address*. It can have two meanings. It can mean, Look in the
> > hashtable identified as *customer* and return the value associated with
> the
> > key *Address*. But *$customer.Address* can also be referring to a method
> > (references that refer to methods will be discussed in the next
> section); *
> > $customer.Address* could be an abbreviated way of writing *
> > $customer.getAddress()*."
> >
> > so, one more question, if I have both the get(String s) and the
> getAddress()
> > methods for the Customer object. In the template, I have
> $customer.Address,
> > Which method would take precedence? customer.get("address") or
> > customer.getAddress()?
> >
> > Jian
> >
> > On 7/7/06, Will Glass-Husain <[EMAIL PROTECTED]> wrote:
> > >
> > > yes.
> > >
> > > WILL
> > >
> > > jian chen wrote:
> > > > Hi, All,
> > > >
> > > > As a long term Velocity user, I think I have been pretty savvy for
> > > > Velocity
> > > > usage. Still got a question to ask though.
> > > >
> > > > If I put a HashMap in the Velocity template,
> > > >
> > > > HashMap map = new HashMap();
> > > > map.put("aKey", "aValue");
> > > > ctx.put("map", map);
> > > >
> > > > I can retrieve the value in the template by: $map.aKey.
> > > >
> > > > I tried to find relevant info. in Velocity user guide, but couldn't
> > > > find any
> > > > relating this usage.
> > > >
> > > > So, is it that $map.aKey is the same as $map.get("aKey")?
> > > >
> > > > Thanks,
> > > >
> > > > Jian
> > > >
> > >
> > > --
> > > Forio Business Simulations
> > >
> > > Will Glass-Husain
> > > phone (415) 440-7500 x89
> > > mobile (415) 235-4293
> > > [EMAIL PROTECTED]
> > > www.forio.com
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]