• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to go to FormBeanon Click

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you sir..
 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sir i forgot to mention that value of property is visible in url how 2 hide it..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic