Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Robin Diederen
Keep the state of an iframe portlet?
March 13, 2012 11:06 AM
Answer

Robin Diederen

Rank: Junior Member

Posts: 35

Join Date: April 13, 2010

Recent Posts

Hello all,

We use iframe portlets for displaying a number of web applications, such as the Exchange webmail.

When navigating back and forth from the page the iframe portlet is located, the iframe porlet forgets its earlier state and falls back to its default.

I know this to be standard behavior of the iframe portlet, yet for our purposes, it's quite annoying :-). Are there any "fixxes" available? If not, tips would be welcome too!

TIA!
Jan Gregor
RE: Keep the state of an iframe portlet?
March 15, 2012 3:36 PM
Answer

Jan Gregor

Rank: Regular Member

Posts: 224

Join Date: October 20, 2010

Recent Posts

Hi Robin,

What do you mean by default behaviour ? What is exactly the problem here ? Take a look at proxy portlet too if you want to have some custom rendering of your application.

Regards,
Jan.
Robin Diederen
RE: Keep the state of an iframe portlet?
March 15, 2012 4:15 PM
Answer

Robin Diederen

Rank: Junior Member

Posts: 35

Join Date: April 13, 2010

Recent Posts

Jan Gregor:
Hi Robin,

What do you mean by default behaviour ? What is exactly the problem here ? Take a look at proxy portlet too if you want to have some custom rendering of your application.

Regards,
Jan.


The default behavior of Liferay is to reload all portlets when switching between pages. We actually require the exact opposite: we want to switch between pages without reloading. My guess'd be it needs some kind of ajax trick to make that work (switching without loading).

Could the proxy portlet possibly solve this? Haven't had a look at it since 5.2.3; back then I never achieved any good results with it emoticon

Thanks!
Hitoshi Ozawa
RE: Keep the state of an iframe portlet?
March 15, 2012 5:16 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

You're right about redrawing. Just changing your web mail to ajax wont help you if you still switch pages nor with the proxy portlet.

If you web mail is able to save states by specifying a uri parameter, it's possible to append the these uri parameters in the iframe.
Robin Diederen
RE: Keep the state of an iframe portlet?
March 16, 2012 2:53 PM
Answer

Robin Diederen

Rank: Junior Member

Posts: 35

Join Date: April 13, 2010

Recent Posts

Hitoshi Ozawa:
You're right about redrawing. Just changing your web mail to ajax wont help you if you still switch pages nor with the proxy portlet.

If you web mail is able to save states by specifying a uri parameter, it's possible to append the these uri parameters in the iframe.



We actually considered to use such a construction, but then we realized that it's only a partial solution. This may redirect us to the page we were earlier, but in case we made some input (a webform, for example), that will still be lost.

Or am I wrong here?