日期:2014-05-17 浏览次数:20699 次
<a href="ShowMainTypeAction?deleteMainType"
onclick="return confirm('确定删除?')">删除</a>
<action name="ShowMainTypeAction"
class="com.xunfang.em_mallServer.action.ShowMainTypeAction">
<result name="success">/main_type.jsp</result>
<result name="delete">/test1.jsp</result>
</action>
/**
* @description 删除指定的商品大类
* @return
*/
public String deleteMainType() {
System.out.println("删除mainTYpe");
this.mainType = this.listMainType.get(0);
if (HibernateCRUD.delete4MainType(this.mainType.getmId())) {
System.out.println("删除成功!");
return "delete";
} else {
return null;
}
}
<action name="deleteMainType"
class="com.xunfang.em_mallServer.action.ShowMainTypeAction">
<result name="error">/xxx.jsp</result>
<result name="delete">/xxx.jsp</result>
</action>