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"/> ------- Not sure if this has to be hidden.

<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() {
               var copyObj=document.getElementById("copyImgID");

               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.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to