• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to go to FormBeanon Click

 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The problem is like this.
I have 1 html page with 2 frames in it(left side and right side).In left
frame there are 3 links ( Click1 , Click2, Click3).Now i want on clicking these links it should go to corresponding ActionForm bean where value corresponding these links can be set using setter methods and then in action class i can retrieve values of these links. In execute method of Action Class i have to connect to database to retrieve values and show in right side of frame....

in general ->> on clicking Click1 values from database should be shown in
right side frame. same for other clicks..

Hope anyone understands what i have written above!!! and reply me...


bye
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to get a link to be displayed in a different frame, use the target attribute of the <a> tag. To pass values on to an action, just use parameters in the query string. Struts will then map them to properties in the ActionForm bean.

Here is an example:

<a href="action1.do?property1=abc" target="frameB">Click 1</a>
<a href="action2.do?property1=def" target="frameB">Click 2</a>
<a href="action3.do?property1=xyz" target="frameB">Click 3</a>
 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you sir..
 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir can u tell me how to get tat value in execute method..setter and getter are not working..
 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir i forgot to mention that value of property is visible in url how 2 hide it..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic