aspose file tools*
The moose likes JSF and the fly likes Disabling Back Button of the Browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Disabling Back Button of the Browser " Watch "Disabling Back Button of the Browser " New topic
Author

Disabling Back Button of the Browser

Aravind Bhat
Ranch Hand

Joined: Jun 16, 2006
Posts: 32
For my application in JSF ,I'm in need of disabling the back button of the browser . Kindly help me on this by providing alternative methods to do this on the server side.Also , I need to know about the state machine architecture which I've learnt is one of the methods to disable the browser buttons .

Thanks in Advance ,

Aravind
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41488
    
  52
Disabling the back button doesn't really work. It's better to make sure that any bad results that might come of a user using it are prohibited. I'm assuming that you want to make sure a user can't double-submit a form? Then the solution is described here (or here if you use Struts).

Wikipedia has an article on finite state machines.
[ January 09, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Aravind Bhat
Ranch Hand

Joined: Jun 16, 2006
Posts: 32
Thnks for the reply .But I really don't understand the relation between state machine architecture and Back button functionality . Could you please elaborate on this ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41488
    
  52
I don't understand the connection between FSM and the back button either. You said you had learned about that - maybe you can ask your instructor?
Aravind Bhat
Ranch Hand

Joined: Jun 16, 2006
Posts: 32
learnt in the sense somebody told me I can use it - why else would I have wanted to know 'bout it . If you find something on it , please tell me .

Thanks ,
Aravind
Aravind Bhat
Ranch Hand

Joined: Jun 16, 2006
Posts: 32
Also , I'm confused as to under what circumstances JSF uses get and when it uses POST . Under PRG , It's quite evidene that JSF uses POST but when I try request.getMethod() in my phaseListener , It returns me GET . Is there any way I can force it to submit through POST ?
Hung Tang
Ranch Hand

Joined: Feb 14, 2002
Posts: 148
hutputLink uses GET (if you do a non-faces request)
h:commandButton uses POST,
for examples,
[ January 09, 2007: Message edited by: Hung Tang ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disabling Back Button of the Browser