Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 QUERY Regarding Built in Type Conversions in Struts2 Framework

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the statement in Apache site .

By default, Struts2 automatically converts many common types between the String value
received as a form field value and the object or primitive type that is to be set on the action.
These include boolean, Boolean, char, Character, int, Integer, float, Float, long, Long,
double, Double, and Date.


As usual i failed to understand the above

When the user enters some number in textfield (This will be in a String Format)


And in my Action class i have a property called number with int type



Will the conversion takes place automatically ?

Please help to learn a drop in this struts2 ocean
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it takes place automatically. (It might have been quicker to just try it ;)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic