aspose file tools*
The moose likes Struts and the fly likes Displaying modified VO  values in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Displaying modified VO  values in JSP " Watch "Displaying modified VO  values in JSP " New topic
Author

Displaying modified VO values in JSP

Sunitha Mudidani
Greenhorn

Joined: Apr 25, 2006
Posts: 28
Hi,

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.

Thanks
Sunitha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying modified VO values in JSP
 
Similar Threads
Design question
Error in action class
simple date format
Unable to get Date instance in a particular format
Formatting Dates