• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Typical browser problems covered by JSF 2.0, The Complete Reference?

 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

unfortunately I'm not too familiar with JSF 2.0 so I'm unsure if the question even makes much sense. But I'm particular interested if JSF 2.0 offers help to solve the well-known browser problems like re-submits when a page is reloaded or the user presses the browser back button. And does the book cover this topics or at least gives hints on best practices how to solve the problems with JSF 2.0?

Thanks in advance!

Marco
 
Riaan Nel
Ranch Hand
Posts: 160
IntelliJ IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm hoping that JSF 2.0 offers a page scope, although I guess that it's unlikely.

Regards,
Riaan
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF 2.0 has a "view scope" which to my understanding should be similar a similar concept.

I think it would even more useful to have something like the conversation scope in JBoss Seam.

Marco
 
Ed Burns
author
Ranch Hand
Posts: 82
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco Ehrentreich wrote:Hi,

unfortunately I'm not too familiar with JSF 2.0 so I'm unsure if the question even makes much sense. But I'm particular interested if JSF 2.0 offers help to solve the well-known browser problems like re-submits when a page is reloaded or the user presses the browser back button. And does the book cover this topics or at least gives hints on best practices how to solve the problems with JSF 2.0?


The JSF Expert Group has considered solving the back button problem on and off over the years, but ultimately we decided it was an application level thing. The book does not have a specific example of this.

Ed
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry if this question may be stupid, I'm probably not (yet) an expert for those view layer things. But if I got you right in other posts here JSF does offer support for the PRG pattern right? Doesn't this help to solve the back button problem or have I missed something?

Marco
 
Sumeet Singh Aryan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to use tokeniser framework in JSF

http://www.learntechnology.net/content/struts/struts_token.jsp

this link is for struts but we can easily develop the same in JSF application
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sumeet,

thanks for your advice with the tokenizer framework. I had a quick look at it but from what I understand it doesn't really solve the back button problem regarding the user experience. Doesn't it just create unique tokens to identify re-submits on the server side? We're currently using some sort of timestamp in a project exactly to do this. Of course this helps to recognize duplicated posts but there are still annoying browser popup windows if the user clicks back and user sessions are accidentally invalidate because of this naive approach. In my opinion this may protect the integrity of data but it doesn't make the user experience better. But maybe I missed something?!?

Marco
 
Sumeet Singh Aryan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marco,

I implemented the tokenizer framework in JSF and it solves my data duplicate entry problem. Actually without this framework, when we are using back button + forward button or we refresh the submitted page then our data will try to save in database twice, but i solved all this problems by implementing the tokenizer framework in JSF.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic