ChildSingletonMapDefinitionParser with a custom class map value

View: New views
1 Messages — Rating Filter:   Alert me  

ChildSingletonMapDefinitionParser with a custom class map value

by Ted Bashor-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Question for the DefinitionParser experts...

I have
<my:connector>
   <my:element key="" a="" b="" c=""/>
</my:connector>
I want a Map added to my connector, which has entries of key=<key
attrib value> and value=<bean class with a,b,c properties>

I've got something that works by doing my own version of
ChildSingletonMapDefinitionParser that sets the Class to be a custom
extension of MapEntryCombiner.  a, b, and c get set on
MyMapEntryCombiner and I pass them into an instance of my bean class
which I've created and set as the value of MapEntryCombiner.

So this works, but I'm thinking there has to be a less hacky way to do
this.  It's a pain to remember that when I add a new attribute d, I
have to update MyMapEntryCombiner.  I'd like to the parse to set these
properties directly on my bean class.
Any ideas?

Thanks, Ted

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


LightInTheBox - Buy quality products at wholesale price