• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying modified VO values in JSP  RSS feed

Sunitha Mudidani
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a VO (say, SourceVO) that has the Date values stored in DATE type variable.
As I need to change the format and display that in the front end, i am suggested to create another VO(say, DestVO) that will hold the values in the required format and use PropertyUtils.copyProperties(destVo, sourceVo) to copy the values. But I have to set the values in the String format after conversions, explicitly by calling the Setter method. Similarly If any of the values are null, I have to put a '--' string in those fields, by calling the setter methods explicitly after checking for null.

1) Can the entire thing be done in a easy manner rather than above ?

2)If Iam using the original VO itself, then all these modifications need to be done in the jsp itself using scriptlets and expressions (These can be avoided using struts tags to some extent but not entirely.. )
Is the above approach correct to avoid this situation ?

Pls suggest.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!