View Full Version : Portlet refresh Problem

11 Aug 2009, 9:56 AM
Hi - this is Lars, who really likes GXT!!!

But I have a problem with the portlet. Iīm searching for a way to refresh / reload a portlet.
Iīm Using GXT 2.0.1 and GWT 1.7 with eclipse plugin 3.5

My Scenario:
I try to show a Grid in a portlet. This is not the problem itself - pricipial this works fine.

My Problem:
But if i try to fill the grid from a ListStore wich is filled by an AsyncCallback i have an empty portlet with no data.

I think this is the reason:
This is becaus the AsyncCallback is slower than the GUI. Means the Gui shows the portlet faster then the RPC fills it with data.

I tried the following to find a solution:
I made a button which calls

this doesnīt work :-(

I tried also the following:


this also didnīt worked.

After that:
I didnīt add the portlet at the initial start of the app.
Instead a made a button which made the following:


E Voila:
After app is loaded i wait 2 Seconds than press the button and the portlet comes up with the Grid and all my data is shown in the portlet.

Now my question:
How can a refresh / reload a portlet / portlet content???
I canīt find anything that works and now i hope anybody here has an idea!

Thanks a lot for every hint

17 Mar 2010, 5:23 AM
you can resolve the problem by
REMOVE the portlet from the portal and then INSERT OR ADD the portlet into the portal
but remember this when you add the portlet after the remove you would call the service method means you call the service which on the server side

me customize the Portal class and edit or override the ADD method and add two new parameter Row and Column means targeted position where want insert or add the portlet


here you would call the server side service ...........

17 Mar 2010, 6:37 AM
You can say

Portlet portlet = new Portlet();
Specifies if the container's layout should be called when widgets are added or removed.

And you can say grid.getStore().setMonitorChanges(true);

The AsyncCallback can now fill and display the gridstore in the grid after rendering.