struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "diogo pontual" <diogopont...@gmail.com>
Subject Re: Form submitted twice (no AJAX!)
Date Wed, 19 Nov 2008 17:34:20 GMT
Are you using Spring with Struts2???



On Wed, Nov 19, 2008 at 3:32 PM, Milan Milanovic
<milanmilanovich@yahoo.com>wrote:

>
> Hi,
>
> I have a simple jsp form:
>
> <head>
>        <s:head theme="ajax" debug="true" />
> </head>
> <s:form action="showReport" namespace="/reports" validate="true">
>
>                From date: <s:datetimepicker id="fromDate"
> displayFormat="dd.MM.yyyy"
> type="date" name="fromDate" label="Od datuma" theme="simple"/><br/>
>                To date: <s:datetimepicker id="toDate"
> displayFormat="dd.MM.yyyy"
> atype="date" name="toDate" label="Do datuma" theme="simple"/><br/><br/>
>                <tr>
>                        <td colspan="2"> </td>
>                </tr>
>                <tr>
>                        <td colspan="2"><s:select id="user" label="User"
>                                list="users" name = "user.id"
> emptyOption="false"
>                                listKey = "id" value = "user.id"
>                                headerKey="None" multiple="false"
> theme="simple"/>
>                        </td>
>                </tr>
>                <tr>
>                        <td colspan="2"><s:submit value="Show report"
> theme="simple" /></td>
>                </tr>
> </s:form>
>
> And when user click submit button, this form get submitted twice, i.e.
> showReport form action method is called twice! I'm NOT USING AJAX here, I
> DON'T HAVE ANY Javascript functions in this page.
>
> In my struts.xml I have:
>
> <action name="showReport" method="showReport" class="ReportAction">
>                 <result>/pages/reports/report.jsp</result>
>                 <result
> name="input">/pages/reports/chooseReport.jsp</result>
> </action>
>
> What is the problem here ?
> --
> View this message in context:
> http://www.nabble.com/Form-submitted-twice-%28no-AJAX%21%29-tp20584806p20584806.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Diogo Dauster Pontual
diogopontual@gmail.com
61.81850270

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message