From 62ade66979bd4f782e18e992b81887eddac78ed4 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 30 Oct 2014 10:56:14 +0000 Subject: [PATCH] Minor update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-mainbox-widget@101204 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/td/mainboxwidget/client/MainBox.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/mainboxwidget/client/MainBox.java b/src/main/java/org/gcube/portlets/user/td/mainboxwidget/client/MainBox.java index a80cebe..5720dc7 100644 --- a/src/main/java/org/gcube/portlets/user/td/mainboxwidget/client/MainBox.java +++ b/src/main/java/org/gcube/portlets/user/td/mainboxwidget/client/MainBox.java @@ -86,7 +86,7 @@ public class MainBox extends TabPanel { } else { } - //forceLayout(); + // forceLayout(); } }); @@ -230,7 +230,7 @@ public class MainBox extends TabPanel { } } - + } catch (Throwable e) { Log.error("Error in MainBox: " + e.getLocalizedMessage()); e.printStackTrace(); @@ -242,7 +242,7 @@ public class MainBox extends TabPanel { if (tdxPanel.getTabularResourceDataView().getTrId().getId() .compareTo(tabularResourceDataView.getTrId().getId()) == 0) { tdxPanel.update(tabularResourceDataView); - Log.debug("Set Active Widget: "+tdxPanel.getId()); + Log.debug("Set Active Widget: " + tdxPanel.getId()); setActiveWidget(tdxPanel); return; } @@ -255,7 +255,7 @@ public class MainBox extends TabPanel { protected void addContentTDXPanel( TabularResourceDataView tabularResourceDataView, TabResource tabResource) { - + TabItemConfig tdxPanelItemConf = new TabItemConfig( tabResource.getName(), true); tdxPanelItemConf.setIcon(MainboxResources.INSTANCE.tabularResource()); @@ -379,7 +379,11 @@ public class MainBox extends TabPanel { @Override public void onSuccess(TabResource result) { - addContentTDXPanel(tabularResourceDataView, result); + if (result != null) { + addContentTDXPanel(tabularResourceDataView, result); + } else { + Log.debug("No tabular resource In Session"); + } } });