I'm trying to convert string posts into type specific java objects for
pushing straight into my database. I don't want the hastle/bloat of
maintaining two suites of objects/fields one with strings, one with type
specific objects. I can see how to use ConvertUtils to map strings to
objects, and extend the tag libs simply to get the rendering behaviour I
want. However, I can't see an elegant way to handle conversion failures.
I
want something akin to "The <property> you specified is not a valid <type>
"
in my ActionErrors so I can render this generically. But it seems there'
s
no way of accessing the property name that's being converted from inside my
converter. Of course I'd need this information to do the aforementioned.
I think there should be no separation of validation and type conversion, I
can't see why they shouldn't be done together. Should BeanUtils be extended
to cater for this?
i'd say that the answer to this question is: 'yes but'
'yes' it should be possible for a user to plug in an exception handling strategy that'll allow this kind of information to be propergated
'but' something like that needs care taking with the design. beanutils has a very large installed based and we take backwards compatibility very seriously. this means taking some care to make sure that any new abstractions are correct since they will be difficult to change later.
- robert
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]