Fixed Menu
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@111327 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
20ec1d4c4d
commit
b2911eb27a
|
@ -792,7 +792,7 @@ public class TabularDataController {
|
|||
openColumnLabel();
|
||||
break;
|
||||
case COLUMNTYPE:
|
||||
openColumnType();
|
||||
openChangeColumnType();
|
||||
break;
|
||||
case COLUMNADD:
|
||||
openColumnAdd();
|
||||
|
@ -834,7 +834,7 @@ public class TabularDataController {
|
|||
case TABLEAGGREAGETE:
|
||||
break;
|
||||
case TABLEREPLACEBYEXTERNALCOL:
|
||||
openReplaceByExternalColWizard(null);
|
||||
openReplaceByExternalColWizard();
|
||||
break;
|
||||
case ROWADD:
|
||||
doRowAdd();
|
||||
|
@ -998,7 +998,7 @@ public class TabularDataController {
|
|||
@Override
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1043,7 +1043,7 @@ public class TabularDataController {
|
|||
@Override
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ public class TabularDataController {
|
|||
@Override
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1115,7 +1115,7 @@ public class TabularDataController {
|
|||
exportWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1155,7 +1155,7 @@ public class TabularDataController {
|
|||
extractCodelistWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1195,7 +1195,7 @@ public class TabularDataController {
|
|||
codelistMappingWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ public class TabularDataController {
|
|||
unionWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1264,26 +1264,31 @@ public class TabularDataController {
|
|||
|
||||
}
|
||||
|
||||
protected void openReplaceByExternalColWizard(final String colname) {
|
||||
protected void openReplaceByExternalColWizard() {
|
||||
openReplaceByExternalColWizard(null, null);
|
||||
}
|
||||
|
||||
protected void openReplaceByExternalColWizard(final String columnLocalId,
|
||||
final String columnname) {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
public void onSuccess() {
|
||||
openWizard();
|
||||
|
||||
ReplaceByExternalTD replaceByExternalColWizard;
|
||||
if (colname == null || colname.isEmpty()) {
|
||||
if (columnname == null || columnname.isEmpty()) {
|
||||
|
||||
replaceByExternalColWizard = new ReplaceByExternalTD(trId,
|
||||
"Replace By External Columns", eventBus);
|
||||
} else {
|
||||
replaceByExternalColWizard = new ReplaceByExternalTD(trId,
|
||||
colname, "Replace By External Columns", eventBus);
|
||||
columnname, "Replace By External Columns", eventBus);
|
||||
}
|
||||
|
||||
replaceByExternalColWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1323,7 +1328,7 @@ public class TabularDataController {
|
|||
chartWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1362,7 +1367,7 @@ public class TabularDataController {
|
|||
mapWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1421,7 +1426,7 @@ public class TabularDataController {
|
|||
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1454,7 +1459,7 @@ public class TabularDataController {
|
|||
|
||||
public void failed(String title, String message,
|
||||
String details, Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message+" "+details);
|
||||
UtilsGXT3.alert(title, message + " " + details);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
|
@ -1628,7 +1633,7 @@ public class TabularDataController {
|
|||
}
|
||||
}
|
||||
|
||||
protected void openColumnFilter(String columnName) {
|
||||
protected void openColumnFilter(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Open Column Filter Dialog");
|
||||
if (trId != null) {
|
||||
ColumnFilterDialog cfDialog = new ColumnFilterDialog(trId,
|
||||
|
@ -1640,7 +1645,8 @@ public class TabularDataController {
|
|||
}
|
||||
}
|
||||
|
||||
protected void openReplaceColumnByExpression(String columnName) {
|
||||
protected void openReplaceColumnByExpression(String columnLocalId,
|
||||
String columnName) {
|
||||
Log.debug("Request Open Replace Column By Expression Dialog");
|
||||
if (trId != null) {
|
||||
ReplaceColumnByExpressionDialog rceDialog = new ReplaceColumnByExpressionDialog(
|
||||
|
@ -1652,16 +1658,17 @@ public class TabularDataController {
|
|||
}
|
||||
}
|
||||
|
||||
protected void openColumnType() {
|
||||
openColumnType(null);
|
||||
protected void openChangeColumnType() {
|
||||
openChangeColumnType(null, null);
|
||||
}
|
||||
|
||||
protected void openColumnType(String columnName) {
|
||||
Log.debug("Request Open Change Column Tab");
|
||||
protected void openChangeColumnType(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Change Column Type Tab");
|
||||
if (trId != null) {
|
||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||
WidgetRequestType.CHANGECOLUMNTYPEPANEL);
|
||||
e.setTrId(trId);
|
||||
e.setColumnLocalId(columnLocalId);
|
||||
e.setColumnName(columnName);
|
||||
eventBus.fireEvent(e);
|
||||
} else {
|
||||
|
@ -1712,10 +1719,11 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void openColumnBatchReplace() {
|
||||
openColumnDelete(null);
|
||||
openColumnBatchReplace(null, null);
|
||||
}
|
||||
|
||||
protected void openColumnBatchReplace(String columnName) {
|
||||
protected void openColumnBatchReplace(String columnLocalId,
|
||||
String columnName) {
|
||||
Log.debug("Request Open Batch Replace Dialog");
|
||||
if (trId != null) {
|
||||
ReplaceBatchDialog dialog = new ReplaceBatchDialog(trId,
|
||||
|
@ -1728,10 +1736,10 @@ public class TabularDataController {
|
|||
};
|
||||
|
||||
protected void openColumnAdd() {
|
||||
openColumnAdd(null);
|
||||
openColumnAdd(null, null);
|
||||
}
|
||||
|
||||
protected void openColumnAdd(String columnName) {
|
||||
protected void openColumnAdd(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Add Column Tab");
|
||||
if (trId != null) {
|
||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||
|
@ -1745,15 +1753,16 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void openColumnDelete() {
|
||||
openColumnDelete(null);
|
||||
openColumnDelete(null, null);
|
||||
}
|
||||
|
||||
protected void openColumnDelete(String columnName) {
|
||||
protected void openColumnDelete(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Delete Column Tab");
|
||||
if (trId != null) {
|
||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||
WidgetRequestType.DELETECOLUMNPANEL);
|
||||
e.setTrId(trId);
|
||||
e.setColumnLocalId(columnLocalId);
|
||||
e.setColumnName(columnName);
|
||||
eventBus.fireEvent(e);
|
||||
} else {
|
||||
|
@ -1763,15 +1772,16 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void openColumnSplit() {
|
||||
openColumnSplit(null);
|
||||
openColumnSplit(null, null);
|
||||
}
|
||||
|
||||
protected void openColumnSplit(String columnName) {
|
||||
protected void openColumnSplit(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Split Column Tab");
|
||||
if (trId != null) {
|
||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||
WidgetRequestType.SPLITCOLUMNPANEL);
|
||||
e.setTrId(trId);
|
||||
e.setColumnLocalId(columnLocalId);
|
||||
e.setColumnName(columnName);
|
||||
eventBus.fireEvent(e);
|
||||
} else {
|
||||
|
@ -1781,15 +1791,16 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void openColumnMerge() {
|
||||
openColumnMerge(null);
|
||||
openColumnMerge(null, null);
|
||||
}
|
||||
|
||||
protected void openColumnMerge(String columnName) {
|
||||
protected void openColumnMerge(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Merge Column Tab");
|
||||
if (trId != null) {
|
||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||
WidgetRequestType.MERGECOLUMNPANEL);
|
||||
e.setTrId(trId);
|
||||
e.setColumnLocalId(columnLocalId);
|
||||
e.setColumnName(columnName);
|
||||
eventBus.fireEvent(e);
|
||||
} else {
|
||||
|
@ -1835,15 +1846,16 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void openColumnLabel() {
|
||||
openColumnLabel(null);
|
||||
openColumnLabel(null, null);
|
||||
}
|
||||
|
||||
protected void openColumnLabel(String columnName) {
|
||||
protected void openColumnLabel(String columnLocalId, String columnName) {
|
||||
Log.debug("Request Column Label Tab");
|
||||
if (trId != null) {
|
||||
WidgetRequestEvent e = new WidgetRequestEvent(
|
||||
WidgetRequestType.LABELCOLUNPANEL);
|
||||
e.setTrId(trId);
|
||||
e.setColumnLocalId(columnLocalId);
|
||||
e.setColumnName(columnName);
|
||||
eventBus.fireEvent(e);
|
||||
} else {
|
||||
|
@ -1946,13 +1958,13 @@ public class TabularDataController {
|
|||
/**
|
||||
* Edit Row
|
||||
*
|
||||
* @param rowRaw
|
||||
* @param rowsRaw
|
||||
*/
|
||||
private void onRowEdit(RowRaw rowRaw) {
|
||||
if (rowRaw == null) {
|
||||
private void onRowEdit(ArrayList<RowRaw> rowsRaw) {
|
||||
if (rowsRaw == null||rowsRaw.isEmpty()) {
|
||||
UtilsGXT3.alert("No rows selected", "No rows selected");
|
||||
} else {
|
||||
EditRowDialog editRowDialog = new EditRowDialog(trId, rowRaw,
|
||||
EditRowDialog editRowDialog = new EditRowDialog(trId, rowsRaw,
|
||||
eventBus);
|
||||
editRowDialog.show();
|
||||
}
|
||||
|
@ -1972,7 +1984,7 @@ public class TabularDataController {
|
|||
"OperationId: " + event.getGridOperationId());
|
||||
GridOperationId gridOperationId = event.getGridOperationId();
|
||||
ArrayList<String> rows = event.getRows();
|
||||
RowRaw rowRaw = event.getRowRaw();
|
||||
ArrayList<RowRaw> rowsRaw = event.getRowsRaw();
|
||||
CellData cellData = event.getCellData();
|
||||
|
||||
switch (gridOperationId) {
|
||||
|
@ -1980,7 +1992,7 @@ public class TabularDataController {
|
|||
onRowAdd();
|
||||
break;
|
||||
case ROWEDIT:
|
||||
onRowEdit(rowRaw);
|
||||
onRowEdit(rowsRaw);
|
||||
break;
|
||||
case ROWDELETE:
|
||||
onRowsDelete(rows);
|
||||
|
@ -2022,33 +2034,36 @@ public class TabularDataController {
|
|||
"OperationId: " + event.getOperationId() + " Column: \n"
|
||||
+ event.getColumnSelected());
|
||||
String opId = event.getOperationId();
|
||||
// String columnName =
|
||||
// tabularData.getColumnName(event.getColumnSelected());
|
||||
String columnLocalId = mainBoxPanel.getColumnLocalId(event
|
||||
.getColumnSelected());
|
||||
String columnName = mainBoxPanel.getColumnName(event
|
||||
.getColumnSelected());
|
||||
Log.debug("GridColumnName: " + columnName);
|
||||
|
||||
|
||||
Log.debug("Selected column[ColumnLocalId: " + columnLocalId
|
||||
+ ", ColumnName: " + columnName + "]");
|
||||
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNLABEL.toString()) == 0) {
|
||||
openColumnLabel(columnName);
|
||||
openColumnLabel(columnLocalId, columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNADD.toString()) == 0) {
|
||||
openColumnAdd(columnName);
|
||||
openColumnAdd(columnLocalId, columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNBATCHREPLACE
|
||||
.toString()) == 0) {
|
||||
openColumnBatchReplace(columnName);
|
||||
openColumnBatchReplace(columnLocalId, columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNDELETE
|
||||
.toString()) == 0) {
|
||||
openColumnDelete(columnName);
|
||||
openColumnDelete(columnLocalId, columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNTYPE
|
||||
.toString()) == 0) {
|
||||
openColumnType(columnName);
|
||||
openChangeColumnType(columnLocalId, columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNFILTER
|
||||
.toString()) == 0) {
|
||||
openColumnFilter(columnName);
|
||||
openColumnFilter(columnLocalId, columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.ANNOTATIONADD
|
||||
.toString()) == 0) {
|
||||
|
@ -2060,21 +2075,27 @@ public class TabularDataController {
|
|||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNSPLIT
|
||||
.toString()) == 0) {
|
||||
openColumnSplit(columnName);
|
||||
openColumnSplit(columnLocalId,
|
||||
columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNMERGE
|
||||
.toString()) == 0) {
|
||||
openColumnMerge(columnName);
|
||||
openColumnMerge(columnLocalId,
|
||||
columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXPRESSION
|
||||
.toString()) == 0) {
|
||||
|
||||
openReplaceColumnByExpression(columnName);
|
||||
openReplaceColumnByExpression(
|
||||
columnLocalId,
|
||||
columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXTERNAL
|
||||
.toString()) == 0) {
|
||||
|
||||
openReplaceByExternalColWizard(columnName);
|
||||
openReplaceByExternalColWizard(
|
||||
columnLocalId,
|
||||
columnName);
|
||||
} else {
|
||||
|
||||
}
|
||||
|
|
|
@ -74,18 +74,18 @@
|
|||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||
|
||||
<!--
|
||||
|
||||
<set-property name="log_DivLogger" value="ENABLED" />
|
||||
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
||||
<set-property name="log_GWTLogger" value="ENABLED" />
|
||||
<set-property name="log_SystemLogger" value="ENABLED" /> -->
|
||||
<set-property name="log_SystemLogger" value="ENABLED" />
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" /> -->
|
||||
|
||||
|
||||
<!--
|
||||
<set-property name="log_DivLogger" value="DISABLED" />
|
||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" /> -->
|
||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED" /> -->
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
|
|
Loading…
Reference in New Issue