commons-dev 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] Maps
Date Tue, 08 Apr 2003 21:01:07 GMT
hi eric

i think that the reading issue with lists has more to do with the bean 
naming conventions that anything else. i've just committed some code that 
allows any method to be specified as the updater which might help to fix 
the problem. if you could post up a test case which demonstrates the issue 
(in other words, what should happen but doesn't), then i'll take a look 
and see if it's fixed now. if not, i'll try to come up with something.

i'll add map reading to the todo list and take a look sometime soonish.

- robert

On Monday, April 7, 2003, at 06:47 PM, EPugh@upstate.com wrote:

> I had a similar issue with an object extending ArrayList.  I could write 
> out
> the arrayList, but not read it back in.  I found an example in the test
> cases where the solution was to have a small wrapper class around the
> arrayList that followed bean naming conventions.
>
> I would love though to see Betwixt support Maps and ArrayList's out of the
> box.
> Eric
>
> -----Original Message-----
> From: James Strachan [mailto:james_strachan@yahoo.co.uk]
> Sent: Monday, April 07, 2003 1:31 PM
> To: Jakarta Commons Users List
> Cc: Jakarta Commons Developers
> Subject: Re: [Betwixt] Maps
>
>
>
> On Monday, April 7, 2003, at 05:33 PM, robert burrell donkin wrote:
>
>> can anyone remember if there is a way to read map entries using
>> betwixt?
>
>
> I'm not sure if reading Maps is supported yet; AFAIK we've not
> auto-defaulted the digester rules for that.
>
> Though writing of Maps is supported. e.g. if you run the TestBeanWriter
> JUnit test case you should see a bean created with a Map property and
> it should write it out as a series of nested <entry> elements.
>
>
>> if not, then i'm going to add one. would supporting methods such as
>> addFoo(
>> Object key, <SingularType> value) sound reasonable?
>
> Sounds great. I guess the key could be any type; so if someone wanted
> to do...
>
> addFoo(String key, <SingularType> value)
>
> that could be supported too.
>
>
>>
>> - robert
>>
>> On Wednesday, April 2, 2003, at 04:57 AM, Kevin O'Neill wrote:
>>
>>> What method signatures are required to make Maps work?
>>>
>>> I have:
>>>
>>> public Map getPairs()
>>> {
>>> 	return _beanPairs;
>>> }
>>>
>>> public void setPairs(Map pairMap)
>>> {
>>> 	_beanPairs = pairMap;
>>> }
>>>
>>> public void addPair(String key, SimpleBean bean)
>>> {
>>> 	_beanPairs.put(key, bean);
>>> }
>>>
>>> The map gets written, but never read. I've tried a few different
>>> approaches with no success.
>>>
>>> Any help would be great.
>>>
>>> -k.
>>>
>>> --
>>> If you don't test then your code is only a collection of bugs which
>>> apparently behave like a working program.
>>>
>>> Website: http://www.rocketred.com.au/blogs/kevin/
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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


Mime
View raw message