You could also try define a second form and use javascript to post
parameters using onclick event...maybe something like:
<script type="text/javascript">
function submitForm2() {
self.document.Action2Form.variable.value=self.document.Action1Form.varia
ble.value;
self.document.Action2Form.submit();
}
</script>
<html:form action="/Action2.do">
<html:hidden property="variable" />
</html:form>
then...
<html:form action ="/Action1.do">
<html:hidden property="variable" value="value"/>
<html:link href="javascript:void(0);"
onclick="javascript:submitForm2();"> View Loyalty Page</html:link>
-----Original Message-----
From: robin bajaj [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 21 November 2006 4:46 AM
To: Struts Users Mailing List
Subject: another html:link issue
Hi Folks,
I am trying to have an html:link in my jsp form. This form normally
submits to action Action1.do. (<html:form action"/Action1.do">)
But when clicked upon <html:link>, I want to do 2 things :
a) call a different action Action2.do
b) and "set the value and send" one variable (hidden parameter etc.) in
the request/session scope so that Action2.do can process it.
I have tried doing the following
-------------------
<html>
<body>
<html:form action ="/Action1.do">
<html:hidden property="variable" value="value"/>
<html:link forward="myForward"> View Loyalty Page
</html:link>
</html:form>
</body>
</html>
-------------------
Even though my "myForward" points to the right action ("Acton2.do") and
calls it successfully, I still cannot get to submit the "variable" with
its assigned value.
When I do request.getParameter("variable") in my Action2.do code,
I get "null" value.
How can i work around this situation? How about using paramid, paramname
attributes? I couldn't understand their correct usage from Struts 1.1
Api reference , some small snippet will be very helpful and much
appreciated.
Or Any other workarounds are most welcome .
thanks,
robin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]