Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

format problem in bean:write

 
shah rah
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<bean:write name="employee" property="salary" format="$#,000.000" />

my salary is of type String and thus it does not work. Is there a away I can convert it into Double inside the beean:write tag. or should I go about using scriptlets
 
Jim Hardin
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if this helps, but it seems to me it would be easier to make the "salary" Form Bean property/instance-variable a numeric type from the outset.
-Jim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic