Reverse attribute mapping..

Cantor, Scott cantor.2 at osu.edu
Tue Aug 6 11:10:16 EDT 2013


On 8/6/13 11:05 AM, "Rod Widdowson" <rdw at steadingsoftware.com> wrote:

>> > Can a bean property (valueMapper) be shorthanded? Or were you just
>> > comparing syntaxes there?
>
>It looks as though the p-namespace syntax can only be used for strings, or
>references to beans defined elsewhere.   The last would seem to provide
>little benefit here.

Depends if the value mappers are stateless. They could be singletons that
would be defined all at once and then referenced.

>I'll note that the documentation deprecates the mixing of p-namespace and
><property> elements.  I do not find it confusing, but I'll take input from
>those who know this better than I.

I found it somewhat jarring.

>That too (only I slipped and called it attributeIds - I suspect you'd like
>that changed?

I'd leave it for now, we'll have to rationalize our ue of Id vs ID at some
point.

>AFAICS no.  Of course introducing attributeIds as the only way of making
>the
>attribute identifiers known actually makes the bean file slightly more
>complicated.
>
>Further feedback?

There is always the approach I tend to use, have an XML "list", which is
just space-delimited, and parse it after. If the normal case is for one
entry, that might be simpler, though IIRC, Spring may actually support
converting a single string input into a list of one. That might be ok too.

-- Scott




More information about the dev mailing list