aspose file tools
The moose likes Struts and the fly likes Passing parameter through html link tag Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Passing parameter through html link tag" Watch "Passing parameter through html link tag" New topic
Author

Passing parameter through html link tag

Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
Hi

I am working on a jsp page that uses struts html:link tag. The code is given below

<html:link paramName="results" paramId="oid"
paramProperty="location.locationId"
page="/addressMaintenance.do?requestAction=fetchLocationById">
<global:r911PhoneNumber name="results" property="phone" />  


</html:link>

I want to be able to pass another parameter called "fromSessionDetails" with the value true and want this variable and value available in my action class. How can I send a second parameter. the first one I am recieving there is oid.

Thanks
Imad
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

Moved to the Struts forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
Can someone please help??
Thanks
pankajjj jain
Greenhorn

Joined: Oct 12, 2005
Posts: 14
Try to use it
<html:link action="targetname" name="collectionname" property="item" />

where name denotes a collection of item you want to send
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1005
<html:link action="targetname" name="collectionname" property="item" />

this "collectionname" must be a Map of name/value pairs to send with the request.

eg


http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-html.html#link
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2036
hi,

(struts 1.x)

is it possible to do this via xml, like a PARAM tag, instead of scriplet?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Passing parameter through html link tag
 
Similar Threads
Parameter Passing through <html:link> tag
html:link tag
Need Help With Dynamic text box in JSP
No scrolling in text input after uppercase ?
How to sort List Box