It's not a secret anymore!*
The moose likes Struts and the fly likes ActionForm property datatype Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionForm property datatype" Watch "ActionForm property datatype" New topic
Author

ActionForm property datatype

jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
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

Joined: Feb 12, 2010
Posts: 266
Can someone please respond to my question ?

Thanks
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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
 
subject: ActionForm property datatype