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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
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: 61434
    
  67

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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: 1018
<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: 2057
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://aspose.com/file-tools
 
subject: Passing parameter through html link tag