in my form have
<form-bean name="Form" type="org.apache.struts.action.DynaActionForm">
.........
.............
<form-property name="method" type="java.lang.String"/>
</form-bean>
in jsp
<html:hidden name="Form" property="method"/>
...............................
...........................
<fmt:message var="copyVar" key="lbl.copy" bundle="${appbundle}"/>
<html:image property="method" src="images/arrow.png" value="${copyVar}"
styleId="copyImgID" onclick="setMethodName();"/>
JS is
<script>
function setMethodName() {
document.forms[0].method.value="Copy";
}
</script>
struts-config
<action
path="/DispatchAction"
type="com.DispatchAction"
name="Form"
scope="session"
parameter="method">
...................
<forward name="successCopy" path="/PrepareAction.do"
redirect="false"/>
.................................
</action>
Apart from this <html:image> have other submit buttons in the JSP.
<fmt:message var="findLink" key="lbl.find" bundle="${appbundle}"/>
<html:submit onclick="" property="method" value="${findLink}"
styleClass="submitLink"/>
Using LookupDispatchAction to know which button is pressed. Everything works
great but the html:image is not working.
I am using javascript to set the method value. Being a hidden value I
thought it'll submit the method value to the action.
But getting
javax.servlet.ServletException: Request[/DispatchAction] does not contain
handler parameter named 'method'. This may be caused by whitespace in the
label text.
What am I missing?
Thanks.
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]