commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [betwixt] populating a Map
Date Thu, 24 Jun 2004 21:57:34 GMT
hi

there's nothing i can see that looks particularly wrong. maybe you 
might be able to fix the problem by specifying the updater (add 
updater='addBitValue' attribute and value) but i would expect betwixt 
to map ok this out of the box.

are you using the latest code from CVS HEAD or alpha-1?

if you're using alpha-1 then please upgrade to HEAD (or a recent 
nightly) since there have been a lot of bugs fixed since the alpha was 
released.

if you are using CVS HEAD or the problem still persists after 
upgrading, please post a reply since it looks like a bug and i'll try 
to find time to take a look.

- robert

On 23 Jun 2004, at 15:15, Hudalla Kai (QI/SES2) * wrote:

> Hi,
>
> I am trying to create a Bean from a .betwixt XML file that has a 
> java.util.Map property which I would like to populate. However, I am 
> totally stuck. My JavaBean looks like this:
>
> public class BitVectorField extends MdoField
> {
> 	private Map bitValues = new HashMap();
>
> 	public void addBitValue(String key, String value)
> 	{
> 		bitValues.put(key, Integer.valueOf(value));
> 	}
>
> 	public Map getBitValues()
> 	{
> 		return bitValues;
> 	}
> }
>
> My BitVectorField.betwixt file looks like this:
>
> <?xml version='1.0' encoding='UTF-8' ?>
> <info>
> <element name='BitVectorField'>
> 	<attribute name='name' property='name' />
> 	<element name="ValueMapping" property="bitValues"/>
> 	<addDefaults />
> </element>
> </info>
>
> When I try to create an instance of BitVectorField using the following 
> XML file, the bitValues Map does not get populated.
>
> <?xml version='1.0' ?>
> <BitVectorField name="reportingDomains"> 	
> 	<ValueMapping>
> 		<key>headquarter</key>
> 		<value>1</value>
>   	</ValueMapping>
> 	<ValueMapping>
> 		<key>others</key>
> 		<value>2</value>
>   	</ValueMapping>
> </BitVectorField>
>
> I have set the log level to "DEBUG" to see what is happening, but the 
> only thing I was able to find out is that betwixt cannot find an 
> updater for the bitValues property.
>
> Any ideas?
>
> Yours,
> Kai Hudalla
>
> Robert Bosch GmbH, QI/SES2,
> Postfach 300220, 70442 Stuttgart
> Tel. 0711/811-32309
> Fax. 0711/811-265915
> --
> Two OS engineers facing a petri net chart:
>      "dead lock in four moves!"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message