| Author |
Custom/Value Objects with Java Bean
|
Dave Boyd
Greenhorn
Joined: May 29, 2006
Posts: 10
|
|
Hey All,
this is actaully a commons beanutil question but hoping this forum is a good spot for it.
I have a problem with custom objects and java beans
e.g.
class MyCustomNumber
{
}
class MyJavaBean
{
private MyCustomNumber someProp;
//getter and setter
}
I am having allot of difficult in working with custom objects and binding them using commons bean.
PropertyUtils doesn't seem to have type conversion, so i looked into BeanUtils
However the problem I have, some of my properties are collections, but BeanUtils.getProperty() converts everything to a string ( very anoying )
I need to use BeanUtils.setProperty() so I can do the type conversion, but it just doesn't seem right to
set properties using BeanUtils.setProperty() and
get properties using PropertyUtils.getProperty() just so I can support custom value objects and collections as bean properties.
Can anyone give me some advice?
|
 |
 |
|
|
subject: Custom/Value Objects with Java Bean
|
|
|