aspose file tools*
The moose likes Struts and the fly likes how to go to FormBeanon Click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to go to FormBeanon Click" Watch "how to go to FormBeanon Click" New topic
Author

how to go to FormBeanon Click

Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
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


rawat
SCJP 1.4
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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>


Merrill
Consultant, Sima Solutions
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
thank you sir..
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
sir can u tell me how to get tat value in execute method..setter and getter are not working..
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
sir i forgot to mention that value of property is visible in url how 2 hide it..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to go to FormBeanon Click
 
Similar Threads
Forwarding to a JSP specifying a target frame
How to display the xhtml pages at the center of the screen
Table Relationship
plzz solve this problem..???
How to work with commandLink in tree (my-faces Tomahawk) ?