File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ActionForm property datatype

 
jose chiramal
Ranch Hand
Posts: 266
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read that ActionForms should use only String and Booelan properties. Is this a mandatory requirement ? What happens if I dont ? Also its advised that "ActionForm properties should be Strings so that any input can be captured, valid or not" Can somebody please explain the statement in " " ?

Thank you.
 
jose chiramal
Ranch Hand
Posts: 266
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone please respond to my question ?

Thanks
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where you found those statement ? Though browser passed the FORM parameters as stream of text, but its developer who know what is the data type of the form field passed. Setting the correct and expected data type guaranties the correct user data. The only constraint is NOT use any custom compounded class for property.
 
jose chiramal
Ranch Hand
Posts: 266
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone suggest any good site for learning the different type of ActionForm that we have and also having examples for conversion of datatype when we use anything other than String or Boolean.
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Struts docs for the various action form available, and for second question, why do you want to change the data type ? If you want to change, then why you declared them of that type ?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic