You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emi Lu <em...@encs.concordia.ca> on 2010/05/14 17:27:55 UTC
Re: cause does not work
Good morning,
This struts-dojo-tags causes s:submit does work anymore.
Whenever <sx:head /> is added, none s:submit works, could someone helps?
How comes?
<s:form action="ProcessAction">
<s:submit>
</s:form>
public String execute() throws Exception
{ ...
return "update";
}
When click "submit" the execute() never being called!
Thanks alot!
--
Lu Ying
On 05/14/2010 09:21 AM, Emi Lu wrote:
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: cause does not work
Posted by Emi Lu <em...@encs.concordia.ca>.
Figure it out finally!
<sx:datetimepicker displayFormat="yyyy-MM-dd" name="date_example" />
(YYYY-MM-DD)
date_example has to be String but cannot be type Date.
Otherwise, <s:submit action="methodProcessAction"> Will not dispatch to
method()!
--
Lu Ying
On 05/14/2010 11:27 AM, Emi Lu wrote:
> Good morning,
>
> This struts-dojo-tags causes s:submit does work anymore.
>
> Whenever <sx:head /> is added, none s:submit works, could someone helps?
>
> How comes?
>
>
>
>
> <s:form action="ProcessAction">
> <s:submit>
> </s:form>
>
>
> public String execute() throws Exception
> { ...
> return "update";
> }
>
> When click "submit" the execute() never being called!
>
>
> Thanks alot!
> --
> Lu Ying
>
>
>
> On 05/14/2010 09:21 AM, Emi Lu wrote:
>> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org