Hi

I have been using LookupDispatchActin for a while and everything works
fine until..

I reuse the same Action class for a couple of JSPs. Some of the JSP has
the button Cancel in them. Because they are in different JSP, the
forwarded JSP will be different when Cancel is selected.

In the getKeyMethodMap() method, I have a few keys which maps to
'Cancel' in my applicationresources.properties. And each of them will
map to a different method. 

Problem is they are using the same 'Cancel' value with parameter
'action'. Because of the way LookupDispatchAction works, the first key
that map will be used and the corresponding method called. 

Can I make it maps to different methods?

How do I resolve this? I am using Struts 1.1.

--------------------------------
To illustrate
--------------------------------
In X.jsp :

<html:cancel property="action" value="Cancel">
      <bean:message key="button.cancelforgotpassword"/>
    </html:cancel>


In Y.jsp :

<html:cancel property="action" value="Cancel">
      <bean:message key="button.cancelsign"/>
    </html:cancel>

In properties :

button.cancelforgotpassword = Cancel
button.cancelsignup = Cancel


In Action :

protected Map getKeyMethodMap() 
 {
  Map map = new HashMap();
 map.put("button.cancelsignup", "cancelSignup");
 map.put("button.cancelforgotpassword", "cancelForgotPassword");
 return map;
 }


Thanks

Sebastian Ho


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

Reply via email to