File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes populating Action Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "populating Action Form" Watch "populating Action Form" New topic
Author

populating Action Form

simmi kamal
Greenhorn

Joined: Sep 07, 2007
Posts: 17
Hi all,

I am new to Struts, can anyone help me out as to
How I can populate the Action Form's property with the value from the JSP in the Action class.

I have the following code in the JSP



and i have the property roleName in the Action Form which i want to set wih the value of varRoleName in the above function in the JSP.

How can I achieve this in the ACtion class ???

In the struts_config file I have given the <
input="the above jsp"
name="name of the Action Form"
type="the action class"
scope="request">


Thanks a lot.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I am pretty sure that case must match between your form and the parameters on the url. So if your form has a property roleId with a method setRoleId then the url should use "roleId". Struts will take care of populating the values in your form.

- Brent
simmi kamal
Greenhorn

Joined: Sep 07, 2007
Posts: 17
Thanks Brent.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: populating Action Form
 
Similar Threads
How to get the value from action to the javascript.
Can not update the struts form
How to update the object property on the server side by updating value in javascript before submit
javabean problem
is nesting of struts html:form valid & how it works