What about:

<set-object property="foo"
object="mapped-configuration:MyConfiguration:keyProperty"/>

This would be easy to implement; it takes a configuration's List,
creates a Map from it based on a named keyProperty and assigns that
Map to the property of the contructed service.

Can you just tell that I love the ObjectProvider concept?  I wish I
had thought of it much earlier.


On Wed, 10 Nov 2004 13:56:42 -0500, Steve Gibson <[EMAIL PROTECTED]> wrote:
> Its too bad we couldn't specify Collection and be able to mutate a
> Collection to a Map.
> An EntrySet is a Set, could be expressed as a List, but forms the basis
> for a Map.
> 
> Too bad the Collections framework doesn't do this for us...
> 
> Steve Gibson
> 
> -----Original Message-----
> From: David J. M. Karlsen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 10, 2004 1:36 PM
> To: [email protected]
> Subject: [SPAM] - Retrieve configuration as a Map - Email has different
> SMTP TO: and MIME TO: fields in the email addresses
> 
> Proposal for 1.1 / general feature request (also put on the wiki-web):
> 
> Very often configuration for implementation classes is a set of unique
> and required properties. Therefore it would be very interesting to
> retrieve the configuration as a Map rather than a List, because it's
> possible to use keys, rather than retrieving a List and not knowing
> which property is which.
> 
> What do you think?
> 
> ---------------------------------------------------------------------
> 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]
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to