Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Refreshing listgrids from SummaryTabs that aren't visible?

$
0
0
Hello,

My setup is as follows:
smartgwt-enterprise-4.0-p20141014.jar
Testing in firefox 26.0.

My basic problem is I'm having trouble refreshing list grids inside a summary tab, where the specific summary tab is not selected (i.e. the listgrid is not currently visible to the user, but has been loaded). My specific situation is as follows:

I have a SummaryTabSet with multiple SummaryTabs. Each summary tab has a ListGrid that is databound to our DB. The list grid fetches paged data. The tab has basic paging buttons to fetch more, change the fetch size, etc. There is one field that is added to the list grid that is not databound, which is a checkbox that keeps track of things that should be plotted on a map. This field is instantiated as follows:

Code:

ListGridField independentPlotCol = new ListGridField(INDEPENDENT_PLOT_ATTRIBUTE_NAME, " ");
independentPlotCol.setType(ListGridFieldType.BOOLEAN);
independentPlotCol.setDataPath(INDEPENDENT_PLOT_ATTRIBUTE_NAME);
independentPlotCol.setHidden(false);

Button headerButton = new Button();
// image bundle is of type com.google.gwt.resources.client.ClientBundle
headerButton.setIcon(IMAGE_BUNDLE.plotOn().getSafeUri().asString());
headerButton.setPrompt(WebAppConstants.PLOT_MODE_ON_TOOLTIP);

independentPlotCol.setHeaderButtonProperties(headerButton);
independentPlotCol.setCanEdit(true);
independentPlotCol.setAlign(Alignment.CENTER);
independentPlotCol.setCanToggle(true);
independentPlotCol.setCanSort(false);
independentPlotCol.setShowDefaultContextMenu(false);

When this checkbox is clicked, the application will plot things on the applications map. On specific tabs, if this checkbox is clicked on a record, it will need to set the independentPlotCol of another record(s) in a different SummaryTabs list grid to true. This is where my issue is coming up. I've tried multiple ways to refresh the other non-visible list grid without making another fetch call, but anytime I click to that other tab, the independentPlotCol of the specific record is no checked. For some reason, if I fetch the data again for that listgrid, the independentPlotCol will be set correctly. All of these I've tried calling after the value is set, by the way.

Is this possible to refresh a non-visible listgrid without making a new fetch call for my situation? I have tried the following things:
-refreshing the specific cell of the record in the listgrid
-refreshing the specific record.
-listGrid.markForRedraw() (and even listGrid.redraw()).

Thanks

Viewing all articles
Browse latest Browse all 4756

Trending Articles