Two Laptop Bag*
The moose likes Struts and the fly likes Struts navigation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts navigation" Watch "Struts navigation" New topic
Author

Struts navigation

J Haley
Ranch Hand

Joined: Jul 22, 2004
Posts: 66
I have a jsp page that has previous, next, and a couple of other links that all post to the same struts action. Currently my action is aware of the links that been clicked by using javascript in the jsp that sets the same hidden variable. Once in my action I just read the property that was set with javascript. Question is, how do this without javascipt? Is what I am currently doing a good practice?
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

You can use the button as a variable. Only the button that is clicked gets submitted with the form.


A good workman is known by his tools.
Jay Pawar
Ranch Hand

Joined: Aug 27, 2004
Posts: 411
You can derive your Action Class from LookUpDispatchAction class. For more details check out this link
http://husted.com/struts/tips/003.html


Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.
J Haley
Ranch Hand

Joined: Jul 22, 2004
Posts: 66
Thanks for the info. I tried to check out the link, but it does not work.
Jay Pawar
Ranch Hand

Joined: Aug 27, 2004
Posts: 411
Hmmmm... doesn't work ...that is interesting. Anyways, I would suggest you to make a Google Search on "Struts Tips" and click the link which says Struts Tips- Husted dot com.

Hope that helps...

Thanks
Jay
Chris Gastin
Ranch Hand

Joined: Aug 13, 2002
Posts: 51
Originally posted by Jay Pawar:
You can derive your Action Class from LookUpDispatchAction class. For more details check out this link
http://husted.com/struts/tips/003.html



Is LookUpDispatchAction a new Action class? Did they start using this because of the refactoring for Common Chains implmentation they were putting in Struts?


Chris Gastin<br />SCJP 1.4<br />SCWCD 1.3
 
 
subject: Struts navigation
 
Similar Threads
Counting the number of visitors for a web page- JavaScript and Struts1
creating a jsp with 4 links using struts 2 tags
Need a Solution for struts
Tags for displaying Date Input field in STRUTS?
Referencing Javascript