I use a two pronged approach:
1) After a save do a redirecting forward. This means that refresh will not
resubmit the save process.
2) Use tokens so that if somehow the user manages to resubmit the save
process you can intercept this.

Paul

> -----Original Message-----
> From: Alvin Antony [mailto:[EMAIL PROTECTED]
> Sent: 16 July 2004 13:15
> To: [EMAIL PROTECTED]
> Subject: simple Question
> 
> 
> hi friends,
>           how can i prevent the user from refreshing the page 
> and repeating the save process a second time?. Is the 
> Transaction token is good for checking this? 
> 
> thanks a lot,
> Alvin
> 
> ________________________________________________________________
> Alvin Antony
> Software Engineer
> 
> Ludwig-Maximilians-Universitaet München
> Zentrale Universitaetsverwaltung
> Referat IIIA 3 (Anwendungs Entwicklung)
> Theresienstr. 37 / 2. Stock  Zi. 249
> 80333 Muenchen
> 
> phone  +49 (089) 2180 - 4005
>         
> mail      [EMAIL PROTECTED] 
> web     http://informationstechnik.verwaltung.uni-muenchen.de 
> 
> >>> [EMAIL PROTECTED] 16.07.04 13.14 >>>
> Dear,
> 
> First u need to set the hyperlink of the action(in
> which u have implemented delete method logic) on the
> primary key basis through which u will delete the
> record and create an action forard in struts config
> file(action of the class in which u have implementated
> the logic to diaplay records in the view) and forward
> to that action from delete method.
> 
> ---------------- Struits-config.xml ----------------
> <forward name="viewAction"
> type="viewAction.do?parameter=methodName">
> -----------------------------------------------------
> 
> ------------------- View ----------------------------
> <a href="deleteAction.do?primaryKey=xyz"> Delete </a>
> (or use struts link tag)
> -----------------------------------------------------
> 
> from delete action u need to forward to viewAction and
> all display logic will be there.
> 
> Plz let me know in case of any inconvenience/problem.
> 
> regards,
> Buland
> 
> --- Jon Barber <[EMAIL PROTECTED]> wrote:
> > Dear All,
> > 
> > Trawled through the archive with no luck, but then I
> > couldn't work out
> > the best search terms for this question, so.......
> > 
> > I'm writing a shopping basket app with the usual
> > requirements, and using
> > tiles which has made things a lot less painful.
> > However, I have this one
> > problem that I can't work out a nice way to solve.
> > 
> > On every page of the basket the contents of the
> > basket are shown in a
> > panel at the bottom of the page, and against each
> > product is a 'delete'
> > hyperlink.  When the user clicks on this link the
> > product should be
> > removed and the page refreshed to show the modified
> > info.
> > 
> > My question is - how to code the logic to do the
> > deletion of the product
> > in such a way that the refreshing of the page is
> > handled in a nice way ?
> > I have the usual way of using an Action to populate
> > the contexts to
> > render the page, and then an Action to process the
> > users response. When
> > a product is removed I will have to delete the
> > product & then redirect
> > the user back to the Action to populate the page all
> > over again.
> > 
> > As far as I can see I have 2 options :
> > 
> > 1. Have one Action that performs the product removal
> > and that accepts a
> > URL as a parameter that then redirects the user
> > using that URL. I will
> > have to place the necessary URL in the context so
> > that when the page is
> > rendered the redirect URL is set correctly for
> > wherever the user is.
> > Painful & not very nice - every populate Action will
> > have to put the
> > correct URL for itself into the context.
> > 
> > 2. Have a seperate Action for every single delete
> > page so that each
> > instance knows where to send the user back to. Not
> > much different from 1
> > & leads to a lot of Actions.
> > 
> > Any ideas ? 
> > 
> > Am I missing the obvious ? For example, for 1 can I
> > simply use the
> > present request URL as the URL to redirect the user
> > to to redraw the
> > page ?
> > 
> > Jon.
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> =====
> 
> Buland Altaf Malik,
> Software Engineer, 
> Softech System's(pvt)Ltd. 
> 10/25 asad jan road lahore,cantt - 54810 Pakistan
> Tel: 92-42-6665812 , 92-42-6660802
> 
> Mob: 0333-4344113
> Fax: 92-42-6665792
> 
> http://www.softech.com.pk
> [EMAIL PROTECTED]
> 
> 
> 
> 
>               
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to