The moose likes Other Open Source Projects and the fly likes Custom/Value Objects with Java Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Custom/Value Objects with Java Bean" Watch "Custom/Value Objects with Java Bean" New topic
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
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture