81: Allow the creation and use of expressions on multi column in TDM portlet

Task-Url: https://support.d4science.org/issues/81

Updated Apply Rule on Table

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@115077 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-05-27 16:35:05 +00:00
parent a3005b7cc5
commit 2294a06ba6
2 changed files with 71 additions and 51 deletions

View File

@ -1,4 +1,3 @@
package org.gcube.portlets.user.td.client; package org.gcube.portlets.user.td.client;
import java.util.ArrayList; import java.util.ArrayList;
@ -37,6 +36,7 @@ import org.gcube.portlets.user.td.rulewidget.client.RuleApplyDialog;
import org.gcube.portlets.user.td.rulewidget.client.RuleDeleteDialog; import org.gcube.portlets.user.td.rulewidget.client.RuleDeleteDialog;
import org.gcube.portlets.user.td.rulewidget.client.RuleOpenDialog; import org.gcube.portlets.user.td.rulewidget.client.RuleOpenDialog;
import org.gcube.portlets.user.td.rulewidget.client.RuleShareDialog; import org.gcube.portlets.user.td.rulewidget.client.RuleShareDialog;
import org.gcube.portlets.user.td.rulewidget.client.multicolumn.RuleOnTableApplyWizard;
import org.gcube.portlets.user.td.rulewidget.client.multicolumn.RuleOnTableNewWizard; import org.gcube.portlets.user.td.rulewidget.client.multicolumn.RuleOnTableNewWizard;
import org.gcube.portlets.user.td.sdmxexportwidget.client.SDMXExportWizardTD; import org.gcube.portlets.user.td.sdmxexportwidget.client.SDMXExportWizardTD;
import org.gcube.portlets.user.td.sdmximportwidget.client.SDMXImportWizardTD; import org.gcube.portlets.user.td.sdmximportwidget.client.SDMXImportWizardTD;
@ -918,7 +918,7 @@ public class TabularDataController {
break; break;
case RULE_ON_TABLE_APPLY: case RULE_ON_TABLE_APPLY:
openOnTableApplyRule(); openOnTableApplyRule();
break; break;
case TEMPLATE_OPEN: case TEMPLATE_OPEN:
openTemplateOpen(); openTemplateOpen();
break; break;
@ -1719,78 +1719,67 @@ public class TabularDataController {
}); });
} }
private void openModifyRule() { private void openModifyRule() {
Log.debug("Request Open Modify Rule Dialog"); Log.debug("Request Open Modify Rule Dialog");
RuleOpenDialog cfDialog = new RuleOpenDialog(eventBus); RuleOpenDialog cfDialog = new RuleOpenDialog(eventBus);
cfDialog.show(); cfDialog.show();
} }
private void openDeleteRule() { private void openDeleteRule() {
Log.debug("Request Open Delete Rule Dialog"); Log.debug("Request Open Delete Rule Dialog");
RuleDeleteDialog cfDialog = new RuleDeleteDialog(eventBus); RuleDeleteDialog cfDialog = new RuleDeleteDialog(eventBus);
cfDialog.show(); cfDialog.show();
} }
private void openRulesActiveOnTabularResource() { private void openRulesActiveOnTabularResource() {
Log.debug("Request Open Rules Active on TabularResource Dialog"); Log.debug("Request Open Rules Active on TabularResource Dialog");
if (trId != null) { if (trId != null) {
RuleActiveDialog raDialog = new RuleActiveDialog( RuleActiveDialog raDialog = new RuleActiveDialog(trId, eventBus);
trId, eventBus);
raDialog.show(); raDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", UtilsGXT3.alert("Error", "No current tabular resource present");
"No current tabular resource present");
} }
} }
private void openShareRule() { private void openShareRule() {
Log.debug("Request Open Share Rule Dialog"); Log.debug("Request Open Share Rule Dialog");
RuleShareDialog cfDialog = new RuleShareDialog(eventBus); RuleShareDialog cfDialog = new RuleShareDialog(eventBus);
cfDialog.show(); cfDialog.show();
} }
private void openOnColumnNewRule() { private void openOnColumnNewRule() {
Log.debug("Request Open On Column New Rule Dialog"); Log.debug("Request Open On Column New Rule Dialog");
RuleOnColumnCreateDialog cfDialog = new RuleOnColumnCreateDialog(eventBus); RuleOnColumnCreateDialog cfDialog = new RuleOnColumnCreateDialog(
eventBus);
cfDialog.show(); cfDialog.show();
} }
private void openOnColumnApplyRule() { private void openOnColumnApplyRule() {
Log.debug("Request Open On Column Apply Rule Dialog"); Log.debug("Request Open On Column Apply Rule Dialog");
if (trId != null) { if (trId != null) {
RuleApplyDialog raDialog = new RuleApplyDialog( RuleApplyDialog raDialog = new RuleApplyDialog(trId, eventBus);
trId, eventBus);
raDialog.show(); raDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", UtilsGXT3.alert("Error", "No current tabular resource present");
"No current tabular resource present");
} }
} }
private void openOnTableNewRule() { private void openOnTableNewRule() {
Log.debug("Request Open On Table New Rule Dialog"); Log.debug("Request Open On Table New Rule Dialog");
GWT.runAsync(new RunAsyncCallback() { GWT.runAsync(new RunAsyncCallback() {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
RuleOnTableNewWizard ruleOnTableNewWizard = new RuleOnTableNewWizard(eventBus); RuleOnTableNewWizard ruleOnTableNewWizard = new RuleOnTableNewWizard(
eventBus);
ruleOnTableNewWizard.addListener(new WizardListener() { ruleOnTableNewWizard.addListener(new WizardListener() {
public void failed(String title, String message, public void failed(String title, String message,
@ -1823,26 +1812,55 @@ public class TabularDataController {
} }
}); });
} }
// TODO
private void openOnTableApplyRule() { private void openOnTableApplyRule() {
Log.debug("Request Open On Table Apply Rule Dialog"); Log.debug("Request Open On Table Apply Rule Dialog");
/*if (trId != null) { if (trId != null) {
RuleApplyDialog raDialog = new RuleApplyDialog( GWT.runAsync(new RunAsyncCallback() {
trId, eventBus); public void onSuccess() {
raDialog.show(); openWizard();
RuleOnTableApplyWizard ruleOnTableApplyWizard = new RuleOnTableApplyWizard(
trId, eventBus);
ruleOnTableApplyWizard.addListener(new WizardListener() {
public void failed(String title, String message,
String details, Throwable throwable) {
UtilsGXT3.alert(title, message + " " + details);
resumeUIState();
}
public void completed(TRId id) {
openTable(id);
}
@Override
public void putInBackground() {
Log.debug("PutInBakground");
resumeUIState();
}
public void aborted() {
resumeUIState();
}
});
ruleOnTableApplyWizard.show();
}
public void onFailure(Throwable reason) {
asyncCodeLoadingFailed(reason);
}
});
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", UtilsGXT3.alert("Error", "No current tabular resource present");
"No current tabular resource present"); }
}*/
}
}
private void callDiscard() { private void callDiscard() {
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus); HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
@ -1896,13 +1914,14 @@ public class TabularDataController {
private void openColumnFilter(String columnLocalId, String columnName) { private void openColumnFilter(String columnLocalId, String columnName) {
Log.debug("Request Open Column Filter Dialog"); Log.debug("Request Open Column Filter Dialog");
if (trId != null) { if (trId != null) {
/*ColumnFilterDialog cfDialog = new ColumnFilterDialog(trId, /*
columnLocalId, eventBus); * ColumnFilterDialog cfDialog = new ColumnFilterDialog(trId,
cfDialog.show();*/ * columnLocalId, eventBus); cfDialog.show();
MultiColumnFilterDialog mcfDialog=new MultiColumnFilterDialog(trId, eventBus); */
MultiColumnFilterDialog mcfDialog = new MultiColumnFilterDialog(
trId, eventBus);
mcfDialog.show(); mcfDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert("Error", "No current tabular resource present");

View File

@ -94,8 +94,9 @@
values="en" /> <extend-property name="locale" values="it" /> <extend-property values="en" /> <extend-property name="locale" values="it" /> <extend-property
name="locale" values="es" /> <set-property name="locale" value="en, it, es" name="locale" values="es" /> <set-property name="locale" value="en, it, es"
/> <set-property-fallback name="locale" value="en" /> --> /> <set-property-fallback name="locale" value="en" /> -->
<!-- <!--
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_ConsoleLogger" value="ENABLED" />
<set-property name="log_DivLogger" value="ENABLED" /> <set-property name="log_DivLogger" value="ENABLED" />
<set-property name="log_GWTLogger" value="ENABLED" /> <set-property name="log_GWTLogger" value="ENABLED" />
@ -103,11 +104,11 @@
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" <!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
/> --> /> -->
<set-property name="log_ConsoleLogger" value="DISABLED" /> <set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="DISABLED" /> <set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_GWTLogger" 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" <!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED"
/> --> /> -->