aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Seam - double submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Seam - double submit" Watch "Seam - double submit" New topic
Author

Seam - double submit

Stephane Clinckart
Ranch Hand

Joined: Oct 21, 2003
Posts: 89
Hi,

I have read that Seam resolve the JSF problem of backing button.

What about the double submit problem???

Thanks

Stephane
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

It depends on how you implement things. There are definitely ways that you can double submit when hitting the refresh button, In those cases you probably will want a redirect in the first submit, so that it can't double submit, or maybe you are passing some value as a request param in xhtml, and therefore that value is in the URL that when you click the Refresh button is still there and double submits.

But I also know that you can avoid double submits. I think double submits is not really a Seam issue as a general Web development issue that I feel is easier to resolve with Seam.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Stephane Clinckart
Ranch Hand

Joined: Oct 21, 2003
Posts: 89
Hi,

thanks for answeer.

In fact, I want to know if there is an object or somethink else that can be easilly used for solve the double click problem.

More info about this problem and an approch of the solution here:
http://www.theserverside.com/articles/article.tss?l=RedirectAfterPost
and here:
http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost2

But I know there is some problem when using this pattern with JSF:
Look here: http://osdir.com/ml/jakarta.myfaces.user/2005-08/msg00208.html

Seam has resolved "common problem", may be Seam has resolved the easilly the problem.

Thanks for help.

Stephane
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Actually, one of the enhancements Seam provide to JSF is to keep the FacesMessage after redirect. So, the problem you mentioned is completely resolved in Seam.


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
I just read the TSS articles you referenced. I can positively say that Seam solves this problem. Once a Seam conversation is finished (i.e., the order confirm button is processed), you can still back into the conversation but if you want to click on the "confirm" button again, Seam will just redirect to a standard page you configure.

Of course, the PRG pattern is also well supported in Seam (through JSF). And as I said, Seam keeps JSF messages for you during redirection.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Seam - double submit