• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

populating Action Form

 
simmi kamal
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brent.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic