1

In a JSF 2.0 application, I'm using facelets and trinidad component library. The problem is, with the trinidad modal dialog (which is basically an IFrame), if the session expires while the dialog is open, and the user clicks a button (starting an AJAX request), a login filter will redirect the user to the login page.

However, the login page opens inside the IFrame. How would I break out of the IFrame and redirect the main page instead?

Right now, since it was an AJAX request so a simple redirect to the right page won't do, so I'm sending the following:

<partial-response><redirect url=\"%s\"></redirect></partial-response>

Which will redirect, but inside the IFrame.

Laila Agaev
  • 1,782
  • 1
  • 10
  • 19
  • 2
    possible duplicate of [JSF Phase Listener redirect form not iframe](http://stackoverflow.com/questions/21006840/jsf-phase-listener-redirect-form-not-iframe) – L-Ray Jan 14 '14 at 15:22
  • Yes! This worked. Thanks so much. I looked through the existing questions but I guess I either didn't search for the right keywords, or didn't notice this question. Is there any way to close this as a duplicate? – Laila Agaev Jan 14 '14 at 20:04
  • Hi Laila, I must confess, I don't really know. A reviewer will check this for us. You can try flagging it as a duplicate, too. What also would be great is to upvote the answer on the other side. nice to have been able to help you... L. – L-Ray Jan 14 '14 at 20:08
  • Hi L, I just noticed the close/delete buttons at the bottom of the question and voted for it as a duplicate. I've also upvoted the question / answer that you linked to. I think that's all I can do. :) – Laila Agaev Jan 15 '14 at 14:44

0 Answers0