diff --git a/pom.xml b/pom.xml
index 48e5b03..e5cf40d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,11 +185,10 @@
[2.13.1-SNAPSHOT, 3.0.0-SNAPSHOT)
-
org.gcube.common
home-library
-
+ [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)
provided
diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java
index 00a289a..3e2f51c 100644
--- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java
+++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java
@@ -75,6 +75,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestPropertiesParameterType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.DataView;
+import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.DataViewType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.TabularResourceDataView;
import org.gcube.portlets.user.td.widgetcommonevent.shared.geospatial.GeospatialCoordinatesType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.grid.model.RowRaw;
@@ -132,6 +133,8 @@ public class TabularDataController {
*/
private TRId openTRIdAfterServerUpdate;
+
+
public TabularDataController() {
eventBus = new SimpleEventBus();
callHello();
@@ -439,31 +442,31 @@ public class TabularDataController {
eventBus.fireEvent(new UIStateEvent(UIStateType.START));
break;
case TABLECURATION:
- uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION);
- uiStateEvent.setTrId(trId);
+ uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION,
+ trId, DataViewType.GRID);
Log.debug("ResumeUIState Fire: " + uiStateEvent);
eventBus.fireEvent(uiStateEvent);
break;
case TABLEUPDATE:
- uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE);
- uiStateEvent.setTrId(trId);
+ uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE, trId,
+ DataViewType.GRID);
Log.debug("ResumeUIState Fire: " + uiStateEvent);
eventBus.fireEvent(uiStateEvent);
break;
case TR_CLOSE:
- uiStateEvent = new UIStateEvent(UIStateType.TR_CLOSE);
- uiStateEvent.setTrId(trId);
+ uiStateEvent = new UIStateEvent(UIStateType.TR_CLOSE, trId,
+ DataViewType.GRID);
eventBus.fireEvent(uiStateEvent);
break;
case TR_OPEN:
- uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN);
- uiStateEvent.setTrId(trId);
+ uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN, trId,
+ DataViewType.GRID);
Log.debug("ResumeUIState Fire: " + uiStateEvent);
eventBus.fireEvent(uiStateEvent);
break;
case TR_READONLY:
- uiStateEvent = new UIStateEvent(UIStateType.TR_READONLY);
- uiStateEvent.setTrId(trId);
+ uiStateEvent = new UIStateEvent(UIStateType.TR_READONLY, trId,
+ DataViewType.GRID);
eventBus.fireEvent(uiStateEvent);
break;
case WIZARD_OPEN:
@@ -482,12 +485,9 @@ public class TabularDataController {
private void openTable(TRId tabularResourceId) {
Log.debug("openTable: " + tabularResourceId);
trId = tabularResourceId;
- // tableOpening = new TableId(Constants.TDX_DATASOURCE_FACTORY_ID,
- // trId.getTableId());
- // tabularData.openTable(tableOpening);
uiState = UIStateType.TR_OPEN;
- UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN);
- uiStateEvent.setTrId(tabularResourceId);
+ UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN,
+ tabularResourceId, DataViewType.GRID);
eventBus.fireEvent(uiStateEvent);
}
@@ -495,12 +495,9 @@ public class TabularDataController {
private void updateTable(TRId tabularResourceId) {
Log.debug("updateTable: " + tabularResourceId);
trId = tabularResourceId;
- // tableOpening = new TableId(Constants.TDX_DATASOURCE_FACTORY_ID,
- // trId.getTableId());
- // tabularData.openTable(tableOpening);
uiState = UIStateType.TABLEUPDATE;
- UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE);
- uiStateEvent.setTrId(tabularResourceId);
+ UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE,
+ tabularResourceId, DataViewType.GRID);
Log.debug("UpdateTable Fire: " + uiStateEvent);
eventBus.fireEvent(uiStateEvent);
}
@@ -509,12 +506,9 @@ public class TabularDataController {
private void updateTableForCuration(TRId tabularResourceId) {
Log.debug("updateTableForCuration: " + tabularResourceId);
trId = tabularResourceId;
- // tableOpening = new TableId(Constants.TDX_DATASOURCE_FACTORY_ID,
- // trId.getTableId());
- // tabularData.openTable(tableOpening);
uiState = UIStateType.TABLECURATION;
- UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION);
- uiStateEvent.setTrId(tabularResourceId);
+ UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION,
+ tabularResourceId, DataViewType.GRID);
Log.debug("UpdateTableForCuration Fire: " + uiStateEvent);
eventBus.fireEvent(uiStateEvent);
}
@@ -530,15 +524,13 @@ public class TabularDataController {
case TR_READONLY:
case WIZARD_OPEN:
Log.debug("CloseTabularResource");
- // tabularData.closeTable();
- UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_CLOSE);
- uiStateEvent.setTrId(trId);
+ UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_CLOSE,
+ trId, DataViewType.GRID);
trId = null;
- // tableOpening = null;
uiState = UIStateType.TR_CLOSE;
Log.debug("fireEvent TR_CLOSE");
try {
- eventBus.fireEvent(new UIStateEvent(UIStateType.TR_CLOSE));
+ eventBus.fireEvent(uiStateEvent);
} catch (Exception e) {
Log.debug("Bus Error: " + e.getMessage());
}
@@ -800,7 +792,6 @@ public class TabularDataController {
case LOGS:
openLogsWindow();
break;
-
case DUPLICATE_DETECTION:
openDuplicatesRowsDetection();
break;
@@ -1435,7 +1426,11 @@ public class TabularDataController {
}
public void completed(TRId id) {
- openTable(id);
+ trId=id;
+ uiState = UIStateType.TR_OPEN;
+ UIStateEvent uiStateEvent = new UIStateEvent(
+ UIStateType.TR_OPEN, trId, DataViewType.RESOURCES);
+ eventBus.fireEvent(uiStateEvent);
}
@@ -1475,7 +1470,11 @@ public class TabularDataController {
}
public void completed(TRId id) {
- openTable(id);
+ trId=id;
+ uiState = UIStateType.TR_OPEN;
+ UIStateEvent uiStateEvent = new UIStateEvent(
+ UIStateType.TR_OPEN, trId, DataViewType.RESOURCES);
+ eventBus.fireEvent(uiStateEvent);
}
@@ -1723,10 +1722,6 @@ public class TabularDataController {
});
}
-
-
-
-
private void openModifyRule() {
GWT.runAsync(new RunAsyncCallback() {
public void onSuccess() {
@@ -1734,6 +1729,7 @@ public class TabularDataController {
RuleOpenDialog cfDialog = new RuleOpenDialog(eventBus);
cfDialog.show();
}
+
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
@@ -1748,6 +1744,7 @@ public class TabularDataController {
RuleDeleteDialog cfDialog = new RuleDeleteDialog(eventBus);
cfDialog.show();
}
+
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
@@ -1759,13 +1756,16 @@ public class TabularDataController {
public void onSuccess() {
Log.debug("Request Open Rules Active on TabularResource Dialog");
if (trId != null) {
- RuleActiveDialog raDialog = new RuleActiveDialog(trId, eventBus);
+ RuleActiveDialog raDialog = new RuleActiveDialog(trId,
+ eventBus);
raDialog.show();
} else {
Log.error("TRId is null");
- UtilsGXT3.alert("Error", "No current tabular resource present");
+ UtilsGXT3.alert("Error",
+ "No current tabular resource present");
}
}
+
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
@@ -1779,6 +1779,7 @@ public class TabularDataController {
RuleShareDialog cfDialog = new RuleShareDialog(eventBus);
cfDialog.show();
}
+
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
@@ -1793,6 +1794,7 @@ public class TabularDataController {
eventBus);
cfDialog.show();
}
+
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
@@ -1804,13 +1806,16 @@ public class TabularDataController {
public void onSuccess() {
Log.debug("Request Open On Column Apply Rule Dialog");
if (trId != null) {
- RuleApplyDialog raDialog = new RuleApplyDialog(trId, eventBus);
+ RuleApplyDialog raDialog = new RuleApplyDialog(trId,
+ eventBus);
raDialog.show();
} else {
Log.error("TRId is null");
- UtilsGXT3.alert("Error", "No current tabular resource present");
+ UtilsGXT3.alert("Error",
+ "No current tabular resource present");
}
}
+
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
@@ -1906,34 +1911,37 @@ public class TabularDataController {
}
}
-
-
- //TODO
+
+ // TODO
private void testFeauture() {
GWT.runAsync(new RunAsyncCallback() {
public void onSuccess() {
Log.debug("ResourceListView call");
if (trId != null) {
/*
- ResourcesListViewDialog resourcesListViewDialog = new ResourcesListViewDialog(eventBus);
- resourcesListViewDialog.show();
- resourcesListViewDialog.open(trId);*/
- TDXTabPanelDialog d=new TDXTabPanelDialog(eventBus);
+ * ResourcesListViewDialog resourcesListViewDialog = new
+ * ResourcesListViewDialog(eventBus);
+ * resourcesListViewDialog.show();
+ * resourcesListViewDialog.open(trId);
+ */
+ TDXTabPanelDialog d = new TDXTabPanelDialog(eventBus);
d.show();
d.open(trId);
-
+
} else {
Log.error("TRId is null");
- UtilsGXT3.alert("Error", "No current tabular resource present");
+ UtilsGXT3.alert("Error",
+ "No current tabular resource present");
}
}
+
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
});
}
-
+
private void callDiscard() {
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
historyDiscard.discard();
diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java
index 0118608..9af0efa 100644
--- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java
+++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/FileToolBar.java
@@ -65,7 +65,7 @@ public class FileToolBar {
private TextButton helpButton;
//private TextButton languageButton;
//private TextButton logsButton;
- private TextButton testButton;
+ //private TextButton testButton;
//Language Menu
@@ -476,7 +476,8 @@ public class FileToolBar {
helpLayout.setWidget(0, 1, logsButton);
helpLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
*/
-
+
+ /*
testButton = new TextButton("Test",
TabularDataResources.INSTANCE.test32());
testButton.disable();
@@ -493,7 +494,7 @@ public class FileToolBar {
helpLayout.setWidget(0, 2, testButton);
helpLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
-
+ */
cleanCells(helpLayout.getElement());
@@ -590,7 +591,7 @@ public class FileToolBar {
backgroundButton.enable();
historyButton.disable();
undoButton.disable();
- testButton.disable();
+ //testButton.disable();
break;
case TR_CLOSE:
case TR_READONLY:
@@ -610,7 +611,7 @@ public class FileToolBar {
backgroundButton.enable();
historyButton.disable();
undoButton.disable();
- testButton.disable();
+ //testButton.disable();
break;
case TR_OPEN:
case TABLEUPDATE:
@@ -636,7 +637,7 @@ public class FileToolBar {
backgroundButton.enable();
historyButton.enable();
undoButton.enable();
- testButton.enable();
+ //testButton.enable();
break;
case WIZARD_OPEN:
openButton.disable();
@@ -655,7 +656,7 @@ public class FileToolBar {
backgroundButton.disable();
historyButton.disable();
undoButton.disable();
- testButton.disable();
+ //testButton.disable();
break;
default:
break;
diff --git a/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml b/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml
index 053f948..84e083f 100644
--- a/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml
+++ b/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml
@@ -95,19 +95,19 @@
name="locale" values="es" /> -->
-
+
-
+