留言板

State of an iframe portlet

Philipp Rusch,修改在12 年前。

State of an iframe portlet

New Member 帖子: 12 加入日期: 11-7-4 最近的帖子
Hi all,

I have successfully "casified" Liferay and some legacy applications. The legacy applications are included in an iframe portlet. My problem is, that when I am refreshing the page which holds the portlet or navigating inside the portal, the default page of the legacy app is displayed when the page is rendered again. When the page is rendered again, the legacy app loses it's login credentials. I have already tried the layout.default.p_l_reset=false option without any change to the behavior.

Does anybody know if and how it is possible, that the state of the portlet survives the rendering when I am refreshing the page?

Thank you in advance.
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: State of an iframe portlet

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
One possible solution is to modify iFrame portlet to support SSO.
thumbnail
Stian Sigvartsen,修改在12 年前。

RE: State of an iframe portlet

Regular Member 帖子: 103 加入日期: 10-8-27 最近的帖子
Even with SSO, the web application shown in the iFrame is going to reset to initial state to some extent.

I'm working on a generic solution to the same problem. My solution is to never refresh/reload the parent page. Unless you need to refresh the parent page for some reason, maybe you could consider replacing the parent page with ...
  • ... a set of portlets that do all page refreshes via AJAX ...
  • ... OR a set of iFrames referencing other URLs for all the content that currently reside on the parent page


I'm focussing on the second approach and building a client side to server side IPC (Inter-Portlet Communication) bridge between the iFrames so that all the visible portlets can participate in standard JSR-286 IPC.

This might be beyond your requirements, but I'm happy to share.

-Stian
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: State of an iframe portlet

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Even with SSO, the web application shown in the iFrame is going to reset to initial state to some extent.


Yes. It won't force user to login again but the page will go back to the default page. But thinking about it, isn't that what's
suppose to happen when you refresh a whole page instead of just a portlet?
thumbnail
Stian Sigvartsen,修改在12 年前。

RE: State of an iframe portlet

Regular Member 帖子: 103 加入日期: 10-8-27 最近的帖子
I think it very much depends on your requirements. I my case I am attempting to integrate generic web applications as if they are portlets.
Portlets are often considered the components of a SOA and as such each one would offer a service to a composite application, but not constitute the whole application.

-Stian
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: State of an iframe portlet

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
But my question is why would you want not to refresh all the portlets in a page on a page refresh.
As I writing this, I think I'm beginning to know what you want to do. You want to refresh all the contents
in all the portlets in a page on a page refresh instead of refreshing the portlets themselves.
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: State of an iframe portlet

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
Will SSO and Cookie help in this case when one wants to store the state of iframe portlet. I mean using SSO user wont have to login again and since on refresh this is sure to land on home page, read the cookie on home page and redirect accordingly. Of course now we need to add code to set cookie to hold the current url of the page in iframe.

??
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: State of an iframe portlet

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
That's not going to work too well on a web browser because a user can have multiple web browser opened to a same page and adding/deleting portlet
in one while refreshing on another.
thumbnail
Ravi Kumar Gupta,修改在12 年前。

RE: State of an iframe portlet

Liferay Legend 帖子: 1302 加入日期: 09-6-24 最近的帖子
In the case of multiple windows/tabs in same browser.. I hope there is something to identify tabs. Window Id/Document Id.. something like this.