Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Dipesh Sahu
Whole page getting refreshed, not just the portlet
20. Januar 2012 22:46
Antwort

Dipesh Sahu

Rang: New Member

Nachrichten: 10

Eintrittsdatum: 23. Juli 2011

Neue Beiträge

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.
David H Nebinger
RE: Whole page getting refreshed, not just the portlet
21. Januar 2012 09:41
Antwort

David H Nebinger

Community Moderator

Rang: Liferay Legend

Nachrichten: 8169

Eintrittsdatum: 1. September 2006

Neue Beiträge

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.
Smilelws2010 lwz
RE: Whole page getting refreshed, not just the portlet
2. Oktober 2012 12:48
Antwort

Smilelws2010 lwz

Rang: Regular Member

Nachrichten: 155

Eintrittsdatum: 16. Dezember 2010

Neue Beiträge

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
Bart Simpson
RE: Whole page getting refreshed, not just the portlet
2. Oktober 2012 22:34
Antwort

Bart Simpson

Rang: Liferay Master

Nachrichten: 524

Eintrittsdatum: 29. August 2011

Neue Beiträge

There is code sample available on this one http://www.liferay.com/community/forums/-/message_boards/message/1781210
Brian Kim
RE: Whole page getting refreshed, not just the portlet
2. Oktober 2012 22:49
Antwort

Brian Kim

LIFERAY STAFF

Rang: Expert

Nachrichten: 319

Eintrittsdatum: 16. August 2004

Neue Beiträge

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.
Smilelws2010 lwz
RE: Whole page getting refreshed, not just the portlet
11. Oktober 2012 11:35
Antwort

Smilelws2010 lwz

Rang: Regular Member

Nachrichten: 155

Eintrittsdatum: 16. Dezember 2010

Neue Beiträge

Thanks, those links are helpful.