diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 6276a39..f84671a 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -4,6 +4,12 @@ + + uses + + + uses + uses @@ -16,6 +22,9 @@ uses + + uses + diff --git a/pom.xml b/pom.xml index 5cd936a..073d636 100644 --- a/pom.xml +++ b/pom.xml @@ -123,7 +123,7 @@ - + + + org.gcube.portlets.user + tabular-data-widget-td-source + 1.0.0-SNAPSHOT + @@ -147,7 +153,7 @@ [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT] sources - + org.gcube.portlets.user diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java index 0355940..0ec8b24 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java @@ -91,7 +91,7 @@ public class TabularDataPortlet implements EntryPoint { //Grid - final TabularData tabularData = new TabularData("SimpleJDBCDataSourceFactory"); + final TabularData tabularData = new TabularData("TDDataSourceFactory"); tabularData.addFailureHandler(new FailureEventHandler() { @Override @@ -106,8 +106,8 @@ public class TabularDataPortlet implements EntryPoint { mainPanelLayout.setCenterWidget(grid, gridData); - //TableId tableopening=new TableId("SimpleJDBCDataSourceFactory","1"); - //tabularData.openTable(tableopening); + TableId tableopening=new TableId("TDDataSourceFactory","1"); + tabularData.openTable(tableopening); //Main SimpleContainer mainPanel = new SimpleContainer(); mainPanel.add(mainPanelLayout); diff --git a/src/main/java/org/gcube/portlets/user/td/client/toolbar/AnalysisToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/toolbar/AnalysisToolBar.java index 41a74fa..b6aa4d8 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/toolbar/AnalysisToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/toolbar/AnalysisToolBar.java @@ -60,7 +60,7 @@ public class AnalysisToolBar { FlexTable table = new FlexTable(); group.add(table); - +/* TextButton btn = new TextButton("Bar", TabularDataResources.INSTANCE.chartBar()); table.setWidget(0, 0, btn); diff --git a/src/main/java/org/gcube/portlets/user/td/client/toolbar/EditingToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/toolbar/EditingToolBar.java index 2b8db62..1685406 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/toolbar/EditingToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/toolbar/EditingToolBar.java @@ -61,7 +61,7 @@ public class EditingToolBar { FlexTable importLayout = new FlexTable(); importGroup.add(importLayout); - +/* importButton = new TextButton("Import", TabularDataResources.INSTANCE.importTD()); importButton.setScale(ButtonScale.LARGE); importButton.setIconAlign(IconAlign.TOP); @@ -140,9 +140,9 @@ public class EditingToolBar { exportSDMXButton = new TextButton("SDMX", TabularDataResources.INSTANCE.sdmx()); exportLayout.setWidget(1, 2, exportSDMXButton); - - cleanCells(exportLayout.getElement()); + cleanCells(exportLayout.getElement()); + */ } protected void cleanCells(Element elem) { diff --git a/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java index f45c73e..bcf9c24 100644 --- a/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java @@ -10,6 +10,9 @@ import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portlets.user.td.ciw.server.CSVTDImporter; import org.gcube.portlets.user.td.client.rpc.TabularDataService; import org.gcube.portlets.user.td.importer.server.TabularDataImporterManager; +import org.gcube.portlets.user.tdw.datasource.td.TDDataSourceFactory; +import org.gcube.portlets.user.tdw.server.datasource.DataSourceFactoryRegistry; + import com.google.gwt.user.server.rpc.RemoteServiceServlet; import org.slf4j.*; @@ -39,6 +42,8 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu //System.out.println("Registered DemoCSVTarget"); ScopeProvider.instance.set("/gcube/devsec"); + + DataSourceFactoryRegistry.getInstance().add(new TDDataSourceFactory()); }