From a43314af72c9ec561534636b6988b8935a346687 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 5 Mar 2015 18:13:54 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-open-widget@113481 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/TabResourcesSelectionPanel.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/openwidget/client/TabResourcesSelectionPanel.java b/src/main/java/org/gcube/portlets/user/td/openwidget/client/TabResourcesSelectionPanel.java index 5b88291..3da9342 100644 --- a/src/main/java/org/gcube/portlets/user/td/openwidget/client/TabResourcesSelectionPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/openwidget/client/TabResourcesSelectionPanel.java @@ -77,7 +77,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements HasSelectionHandlers { interface NameTooltipTemplates extends XTemplates { - @XTemplate("{value}") + @XTemplate("{value}") SafeHtml format(String value, String desc); } @@ -165,6 +165,8 @@ public class TabResourcesSelectionPanel extends ContentPanel implements ColumnConfig nameColumn = new ColumnConfig( properties.name(), 90, "Name"); + + /* nameColumn.setCell( new AbstractCell() { @@ -174,8 +176,17 @@ public class TabResourcesSelectionPanel extends ContentPanel implements TabResource tabResource=store.get(context.getIndex()); final NameTooltipTemplates nameToolTipTemplates = GWT - .create(NameTooltipTemplates.class); - sb.append(nameToolTipTemplates.format(value, tabResource.getDescription())); + .create(NameTooltipTemplates.class); + String valueSafe=""; + String descriptionSafe=""; + + if(value!=null){ + valueSafe=SafeHtmlUtils.htmlEscape(value); + } + if(tabResource!=null && tabResource.getAgency()!=null){ + descriptionSafe=SafeHtmlUtils.htmlEscape(tabResource.getAgency()); + } + sb.append(nameToolTipTemplates.format(valueSafe, descriptionSafe)); } });*/ @@ -252,6 +263,8 @@ public class TabResourcesSelectionPanel extends ContentPanel implements } }; + + sm.setSelectionMode(SelectionMode.SINGLE); grid.setLoader(loader);