struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emi Lu <em...@encs.concordia.ca>
Subject <sx:head> cause <s:submit does not do dispatch work
Date Fri, 14 May 2010 13:21:51 GMT
Good morning,

Struts2.1.8.1, when using <sx:head />,

<s:submit action="method1ProcessActoin">, method1 is never triggered?

But if <sx:head /> is removed, method1 in ProcessAction.java is called 
successfully.

Does someone know why?



(1) struts.xml
<action name="*ProcessAction" method="{1}" class="ProcessAction">
    <result name="update" type="tiles">update_menu</result>
    <result name="error" type="tiles">update_menu</result>
    <result name="save_success" type="tiles">main_menu</result>
</action>
(2) ProcessAction.java
    public String execute() throws Exception
    {  ...
       return "update";
    }

    /* This update method is never called by <s:submit> */
    public String update() throws Exception
    {

       return "save_success";
    }

    public String cancel() throws Exception
    {

       return "save_success";
    }

(3) .jsp

<s:submit  value="Update" action="updateProcessAction"> </s:submit>
<s:submit  value="Cancel" action="cancelProcessAction"> </s:submit>



ProcessAction.update() is never called when <sx:head> is added into jsp;

If <sx:head> is removed, ProcessAction.update() is called.

Does anyone knows why?

Thanks a lot!
--
Lu Ying

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message