掲示板

Whole page getting refreshed, not just the portlet

12年前 に Dipesh Sahu によって更新されました。

Whole page getting refreshed, not just the portlet

New Member 投稿: 10 参加年月日: 11/07/24 最新の投稿
Hi,

When I am submitting the form in a portlet, the form is getting correctly submitted and the next page (in the same portlet) is also coming up properly.

But the issue is, when the next page (in the same portlet) is getting loaded, whole page is getting refreshed. The data in other portlets are also getting refreshed.
How do I aviod this ?

I submit the data in the required portlet and that portlet ONLY gets refreshed.

Thanks in advance.
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: Whole page getting refreshed, not just the portlet

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
Instead of doing straight JSR-168/286, step up to a framework that can handle ajax-based submission and refresh such as Vaadin or the like.

Basically what you're seeing is not a bug, it's part of the actual spec. It's why there's a separate action/render phase for portlets. For all of the portlets on a page, only one is called in the action phase (to handle the form submission), but all portlets on the page are called for their render phase (so the portal can aggregate the portlet content into a single page).

If you switch to an ajax-based framework, submits and refreshes would not go through the normal portal phase process, so you don't end up w/ full page refresh.
11年前 に Smilelws2010 lwz によって更新されました。

RE: Whole page getting refreshed, not just the portlet

Regular Member 投稿: 160 参加年月日: 10/12/16 最新の投稿
HI David,

I have scenario to refresh just the porlet and not the whole portlet.

Do you have a sample or some resourceful links to do the same using ajax based framework like ou suggested.

Thanks in advance
--Smile
thumbnail
11年前 に Paul . によって更新されました。

RE: Whole page getting refreshed, not just the portlet

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
There is code sample available on this one http://www.liferay.com/community/forums/-/message_boards/message/1781210
thumbnail
11年前 に Brian Kim によって更新されました。

RE: Whole page getting refreshed, not just the portlet

Expert 投稿: 311 参加年月日: 04/08/17 最新の投稿
Paul, I don't think that's the scenario that Smilews2010 is thinking of.

Smilews2010 - there are lots of examples of how to use AJAX, and even blogs of how to use AJAX with AlloyUI. Just do a search on our site.
11年前 に Smilelws2010 lwz によって更新されました。

RE: Whole page getting refreshed, not just the portlet

Regular Member 投稿: 160 参加年月日: 10/12/16 最新の投稿
Thanks, those links are helpful.