struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milan Milanovic <milanmilanov...@yahoo.com>
Subject Re: Form submitted twice (no AJAX!)
Date Wed, 19 Nov 2008 18:11:32 GMT

It is defined as "prototype"! 


diogo pontual wrote:
> 
> Well, some time ago I was faced to the same problem. The workaround was:
> define all Action's and Interceptor's scope as prototype in my
> applicationContext.xml.
> 
> I hope this help you.
> 
> Diogo Pontual
> 
> On Wed, Nov 19, 2008 at 3:41 PM, Gianluca Musella <
> gianluca.musella@gmail.com> wrote:
> 
>> Do you use ffx or ie or something other?
>>
>> 2008/11/19 Milan Milanovic <milanmilanovich@yahoo.com>:
>> >
>> > Yes, just like here:
>> > http://struts.apache.org/2.0.12/docs/struts-2-spring-2-jpa-ajax.html
>> > http://struts.apache.org/2.0.12/docs/struts-2-spring-2-jpa-ajax.html
>> >
>> > --
>> > Milan
>> >
>> >
>> > diogo pontual wrote:
>> >>
>> >> 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
>> >>
>> >>
>> >
>> > --
>> > View this message in context:
>> http://www.nabble.com/Form-submitted-twice-%28no-AJAX%21%29-tp20584806p20585089.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
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 

-- 
View this message in context: http://www.nabble.com/Form-submitted-twice-%28no-AJAX%21%29-tp20584806p20585835.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


Mime
View raw message