On Monday, August 20, 2001, at 06:37 PM, Craig R. McClanahan wrote:

> On Mon, 20 Aug 2001, robert burrell donkin wrote:

<snip>

>> the good thing is that digester is extensible and one easy way round this
>> problem would be to create a rule that allowed a property with a 
>> different
>> name (from the attribute) to be set. if this is what you need, i can easy
>> and quickly produce a new rule to do just this.
>>
>
> Actually, you don't even need a new rule -- just a BeanInfo class for your
> bean that does the appropriate mapping.  BeanUtils (which is used
> underneath) follows standard Java introspection mechanisms - it does not
> assume that the setter for method foo is always named setFoo().
>

i assumed that jason (hopefully he'll will correct me if i'm wrong) was 
trying to set - say - the 'rubbish' property from the 'trash' attribute. 
(this is reasonably common for xml->object mapping since xml-attributes 
and java method names have different naming rules.)

if there is a neat way to do this mapping using beanutils without write 
new code then that'd be cool (any chance of a pointer?) but otherwise i'm 
pretty keen to create a rule (or modify an existing rule, if that's better)
  since i'm going to run into the same problem pretty soon.

- robert

Reply via email to