|
From: Keith D. <kd...@cs...> - 2004-04-14 13:26:59
|
Yes, the [] syntax makes much more sense. That's what OGNL uses, too (wh=
ich
means WebWork, Tapestry.)
Keith
----- Original Message -----=20
From: "Hunter Kelly" <re...@ei...>
To: <spr...@li...>
Sent: Wednesday, April 14, 2004 5:34 AM
Subject: Re: [Springframework-developer] java.util.Map fields and commons
validator
> I have to say that I personally prefer [] syntax for both indexed and
mapped
> properties, it's a more natural fit with scripting languages, and to me=
it
> just makes more sense - it's an indexing operation, not a method call!
>
> My point is that it'd be great to support other syntaxes, but please
> keep the [ syntax.
>
> H
>
> On Wednesday 14 April 2004 07:44, j=FCrgen h=F6ller [werk3AT] wrote:
> > Karl,
> >
> > Agreed, it makes sense to be consistent with Commons BeanUtils / Comm=
ons
> > Validator / Struts here, while still supporting the current syntax. O=
ur
> > current syntax is somewhat analogous to JSTL EL, but I don't mind
> > supporting further syntactic options, as long as they don't introduce
> > parsing problems.
> >
> > This should be pretty trivial to add, so I'll look into it this weeke=
nd.
> >
> > Juergen
> >
> >
> > ________________________________
> >
> > Von: spr...@li... im Auftrag
von
> > Baum, Karl Gesendet: Mi 14.04.2004 04:19
> > An: spr...@li...
> > Betreff: [Springframework-developer] java.util.Map fields and commons
> > validator
> >
> >
> >
> > I have encountered an issue in regards to validating beans backed by =
a
> > Map object while using the spring commons validator component. My fo=
rm
> > is made to work with key value pairsbacked as a map. It has a field:
> >
> > /**
> > * @return
> > */
> > public Map getValue() {
> > return valueMap;
> > }
> >
> > /**
> > * @param map
> > */
> > public void setValue(Map map) {
> > valueMap =3D map;
> > }
> >
> > The problem isn't specific to the validator adapter. The problem has=
to
> > do with the way Spring symbolizes a mapped property in the
> > BeanwrapperImpl class. Spring uses a '[' where as commons validator =
and
> > struts use '('. Another words a mapped property of firstName would l=
ook
> > like this in Spring:
> >
> > value[firstName]
> >
> > and this in commons validator:
> >
> > value(firstName)
> >
> > Commons validator uses '[' for indexed properties. Spring uses '[' f=
or
> > both indexed and Mapped properties. I think the best place to fix th=
is
> > problem is on the Spring side in the BeanWrapperImpl. We might as we=
ll
> > be consistent with struts and commons validator in regards to our
> > indexed and mapped property sytax. Perhaps we can support both
> > syntaxes.
> >
> > Any thoughts?
> >
> > Karl
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3D=
click
> > _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-develope=
r
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3DClick
> > _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-develope=
r
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
|