I have the problem, that if you have two or more dialog calls in a process, you cannot use the history back button of the browser, as soon as you are past the first dialog.

alt text

In this example, as soon as you reach Education, it does not work anymore.

I think the reason for this is, that the dialog instance is closed, when you leave a dialog and move further (Dialog Close event).

alt text

I think that this is ivy specific, becuase as far as I know, it works properly with plain PF/JSF. In my opinion, the back button should work allways, becaus of the usability, and the developer should take care of what happens with data and so on.

Anyway, does anybody have a solution for this?

asked 26.08.2015 at 08:47

Marcel%20von%20Wyl's gravatar image

Marcel von Wyl
1668
accept rate: 100%

Is there a way to deactivate the back button when we are in a dialog?

(18.09.2015 at 04:20) enricojl enricojl's gravatar image

Here is a work around - You can deactivate the back button. Here is the code to add to the HTML page... It works in Html Dialogs.

<script type="text/javascript"> //for old browsers window.location.hash = "no-back-button"; window.location.hash = "Again-No-back-button"; window.onhashchange = function() { window.location.hash = "no-back-button"; } //for browsers that support HTML5 history.pushState(null, null, 'no-back-button'); window.addEventListener('popstate', function(event) { history.pushState(null, null, 'no-back-button'); }); </script>

http://forum.primefaces.org/viewtopic.php?f=3&t=40503

link

answered 18.09.2015 at 04:53

enricojl's gravatar image

enricojl
315510
accept rate: 0%

edited 18.09.2015 at 05:06

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×54
×34

Asked: 26.08.2015 at 08:47

Seen: 2,121 times

Last updated: 18.09.2015 at 05:06