On 1/6/06, Rafael Taboada <[EMAIL PROTECTED]> wrote: > Hi folks... I'm trying to solve my problem when an user submit a form and he > clicks the submit button more than twice. > > My app runs perfect... I mean, It saves data. But in this case, it saves > data as many clicks the user does. > > Do u know how I can solve that? > > I'm trying to use Struts Dialog: > http://struts.sourceforge.net/strutsdialogs/dialogaction.html > > I implemented an app using that but it still has the same problem... why? > maybe I'm doing something wrong??? I followed the login sample. But in my > case I have a NewData module.
Struts Dialogs does not help to avoid *explicit* resubmits when you go back and hit submit button again. It helps to fight *implicit* resubmits when a user hits "Refresh" button to refload a page. The Login Dialog sample is built in a way that you cannot hit Back button and get to login form, because Login Dialog is stateful and renders non-cachable content. Therefore after you log in and click Back, you will see Logout page, not Login page. Even if you use browser like Opera and you was able to submit the same content again, it is up to the data model to recognise this and either to allow it or to forbid it. Struts Dialogs assumes that web resources are stateful and render themselves according to their state. It does not contain any means like tokens to prevent double submit if your data model and rendering approach allows so. Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]