开发者

EventDispatchAction like implementation in struts 2.2...?

How I can implement EventDispatchAction 开发者_运维百科of struts 1.3 in struct 2.2. i.e. I have single input form which have three submit buttons, Methods of the action class should be called based on the submit button.


This document should explain how to create multiple entry points to an action class: http://struts.apache.org/2.0.14/docs/action-configuration.html

The path of least work would probably be to look at the section "Dynamic Method Invocation". After reading that without any changes to your action mappings you could just tweak your jsp's (or whatever you use for the view).

In the JSP I forget the syntax. Both the form tag and the submit tags have attributes called "action" and "method" however the s:form's method attribute takes a value of POST or GET while I think the s:sumbit tag's "method" parameter means the method of the action.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜