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
This commit is contained in:
Giancarlo Panichi 2015-03-05 18:13:54 +00:00 committed by Giancarlo Panichi
parent c971a44c1d
commit a43314af72
1 changed files with 16 additions and 3 deletions

View File

@ -77,7 +77,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
HasSelectionHandlers<TabResource> {
interface NameTooltipTemplates extends XTemplates {
@XTemplate("<span qtip=\"{value}\" qtitle=\"Format {desc}\">{value}</span>")
@XTemplate("<span qtip=\"{desc}\" qtitle=\"{value}\">{value}</span>")
SafeHtml format(String value, String desc);
}
@ -165,6 +165,8 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
properties.name(), 90, "Name");
/*
nameColumn.setCell(
new AbstractCell<String>() {
@ -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);