Added GroupBy

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@97681 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-06-24 09:57:45 +00:00
parent bfa3bb4d64
commit 72d1ccc46e
3 changed files with 25 additions and 4 deletions

View File

@ -37,6 +37,9 @@
<dependent-module archiveName="tabular-data-column-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-column-widget/tabular-data-column-widget"> <dependent-module archiveName="tabular-data-column-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-column-widget/tabular-data-column-widget">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="tabular-data-toolbox-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-toolbox-widget/tabular-data-toolbox-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-extractcodelist-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-extractcodelist-widget/tabular-data-extractcodelist-widget"> <dependent-module archiveName="tabular-data-extractcodelist-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-extractcodelist-widget/tabular-data-extractcodelist-widget">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>

View File

@ -525,6 +525,7 @@ public class TabularDataController {
case TABLEUNION: case TABLEUNION:
break; break;
case TABLEGROUPBY: case TABLEGROUPBY:
openGroupBy();
break; break;
case TABLEAGGREAGETE: case TABLEAGGREAGETE:
break; break;
@ -1097,6 +1098,24 @@ public class TabularDataController {
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3.alert("Error", "No tabular resource present");
} }
} }
protected void openGroupBy() {
openGroupBy(null);
}
protected void openGroupBy(String columnName) {
Log.debug("Request Group By Tab");
if (trId != null) {
WidgetRequestEvent e = new WidgetRequestEvent(
WidgetRequestType.GROUPBYPANEL);
e.setTrId(trId);
e.setColumnName(columnName);
eventBus.fireEvent(e);
} else {
Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present");
}
}
protected void openColumnLabel() { protected void openColumnLabel() {
openColumnLabel(null); openColumnLabel(null);

View File

@ -120,8 +120,7 @@ public class ModifyToolBar {
groupbyButton.addSelectHandler(new SelectHandler() { groupbyButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) { public void onSelect(SelectEvent event) {
// eventBus.fireEvent(new eventBus.fireEvent(new RibbonEvent(RibbonType.TABLEGROUPBY));
// ImportTableEvent(ImportTableType.JSON));
} }
}); });
@ -138,7 +137,7 @@ public class ModifyToolBar {
aggregateButton.addSelectHandler(new SelectHandler() { aggregateButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) { public void onSelect(SelectEvent event) {
//eventBus.fireEvent(new RibbonEvent(RibbonType.AGGREGATE)); eventBus.fireEvent(new RibbonEvent(RibbonType.TABLEAGGREAGETE));
} }
}); });
@ -334,7 +333,7 @@ public class ModifyToolBar {
// Table // Table
filterButton.disable(); filterButton.disable();
unionButton.disable(); unionButton.disable();
groupbyButton.disable(); groupbyButton.enable();
aggregateButton.disable(); aggregateButton.disable();
addRowButton.enable(); addRowButton.enable();
deleteRowButton.enable(); deleteRowButton.enable();