Hi Deli Dumrul,
if your using struts then
you should try with this. we have a class named LookupDispatchAction in the package org.apache.struts.actions(
not action its actions). here you need give the method name as that of the button and it should be through the ApplicationResource.properties file the method signature is same as that of the execute method.
public class MoreSubmitsAH extends LookupDispatchAction {
public MoreSubmitsAH() {
}
protected Map getKeyMethodMap() {
/**@todo Implement this org.apache.struts.actions.LookupDispatchAction abstract method*/
Map map = new HashMap();
map.put("button.add","add");//the 2nd
string is the method name;
map.put("button.del","delete");
map.put("button.update","update");
return map;
}
public ActionForward add(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
return mapping.findForward("add");
}
public ActionForward delete(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
return mapping.findForward("del");
}
public ActionForward update(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
return mapping.findForward("update");
}
}