Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling Back Button of the Browser

 
Aravind Bhat
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Aravind Bhat
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hutputLink uses GET (if you do a non-faces request)
h:commandButton uses POST,
for examples,
[ January 09, 2007: Message edited by: Hung Tang ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic