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;
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.RuleOpenDialog;
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.sdmxexportwidget.client.SDMXExportWizardTD;
import org.gcube.portlets.user.td.sdmximportwidget.client.SDMXImportWizardTD;
@ -918,7 +918,7 @@ public class TabularDataController {
break;
case RULE_ON_TABLE_APPLY:
openOnTableApplyRule();
break;
break;
case TEMPLATE_OPEN:
openTemplateOpen();
break;
@ -1719,78 +1719,67 @@ public class TabularDataController {
});
}
private void openModifyRule() {
Log.debug("Request Open Modify Rule Dialog");
RuleOpenDialog cfDialog = new RuleOpenDialog(eventBus);
cfDialog.show();
}
private void openDeleteRule() {
Log.debug("Request Open Delete Rule Dialog");
RuleDeleteDialog cfDialog = new RuleDeleteDialog(eventBus);
cfDialog.show();
}
private void openRulesActiveOnTabularResource() {
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");
}
}
private void openShareRule() {
Log.debug("Request Open Share Rule Dialog");
RuleShareDialog cfDialog = new RuleShareDialog(eventBus);
cfDialog.show();
}
private void openOnColumnNewRule() {
Log.debug("Request Open On Column New Rule Dialog");
RuleOnColumnCreateDialog cfDialog = new RuleOnColumnCreateDialog(eventBus);
RuleOnColumnCreateDialog cfDialog = new RuleOnColumnCreateDialog(
eventBus);
cfDialog.show();
}
private void openOnColumnApplyRule() {
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");
}
}
private void openOnTableNewRule() {
Log.debug("Request Open On Table New Rule Dialog");
GWT.runAsync(new RunAsyncCallback() {
public void onSuccess() {
openWizard();
RuleOnTableNewWizard ruleOnTableNewWizard = new RuleOnTableNewWizard(eventBus);
RuleOnTableNewWizard ruleOnTableNewWizard = new RuleOnTableNewWizard(
eventBus);
ruleOnTableNewWizard.addListener(new WizardListener() {
public void failed(String title, String message,
@ -1823,26 +1812,55 @@ public class TabularDataController {
}
});
}
// TODO
private void openOnTableApplyRule() {
Log.debug("Request Open On Table Apply Rule Dialog");
/*if (trId != null) {
RuleApplyDialog raDialog = new RuleApplyDialog(
trId, eventBus);
raDialog.show();
if (trId != null) {
GWT.runAsync(new RunAsyncCallback() {
public void onSuccess() {
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 {
Log.error("TRId is null");
UtilsGXT3.alert("Error",
"No current tabular resource present");
}*/
}
UtilsGXT3.alert("Error", "No current tabular resource present");
}
}
private void callDiscard() {
HistoryDiscard historyDiscard = new HistoryDiscard(eventBus);
@ -1896,13 +1914,14 @@ public class TabularDataController {
private void openColumnFilter(String columnLocalId, String columnName) {
Log.debug("Request Open Column Filter Dialog");
if (trId != null) {
/*ColumnFilterDialog cfDialog = new ColumnFilterDialog(trId,
columnLocalId, eventBus);
cfDialog.show();*/
MultiColumnFilterDialog mcfDialog=new MultiColumnFilterDialog(trId, eventBus);
/*
* ColumnFilterDialog cfDialog = new ColumnFilterDialog(trId,
* columnLocalId, eventBus); cfDialog.show();
*/
MultiColumnFilterDialog mcfDialog = new MultiColumnFilterDialog(
trId, eventBus);
mcfDialog.show();
} else {
Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present");

View File

@ -94,8 +94,9 @@
values="en" /> <extend-property name="locale" values="it" /> <extend-property
name="locale" values="es" /> <set-property name="locale" value="en, it, es"
/> <set-property-fallback name="locale" value="en" /> -->
<!--
<!--
<set-property name="log_ConsoleLogger" value="ENABLED" />
<set-property name="log_DivLogger" 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"
/> -->
<set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_DivLogger" 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"
/> -->