Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Seam - double submit

 
Stephane Clinckart
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Stephane Clinckart
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic