aspose file tools*
The moose likes JSF and the fly likes Typical browser problems covered by JSF 2.0, The Complete Reference? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Typical browser problems covered by JSF 2.0, The Complete Reference?" Watch "Typical browser problems covered by JSF 2.0, The Complete Reference?" New topic
Author

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

Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

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

Joined: Apr 23, 2009
Posts: 160

I'm hoping that JSF 2.0 offers a page scope, although I guess that it's unlikely.

Regards,
Riaan


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." - George Bernard Shaw
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

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

Joined: Sep 11, 2006
Posts: 82
    
    5
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

Joined: Mar 07, 2007
Posts: 1282

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

Joined: Jul 30, 2008
Posts: 43
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


The woods are lovely, dark and deep, But I have promises to keep; And miles to go before I sleep, And miles to go before I sleep. - Robert Frost
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

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

Joined: Jul 30, 2008
Posts: 43
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Typical browser problems covered by JSF 2.0, The Complete Reference?