Updated Rules
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@114364 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
24967d7ab1
commit
d2d1d39a6d
|
@ -5,7 +5,7 @@ import org.gcube.portlets.user.td.expressionwidget.client.rpc.ExpressionServiceA
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyColumnRulesSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||
|
@ -78,8 +78,8 @@ public class RuleApplyDialog extends Window implements
|
|||
hide();
|
||||
}
|
||||
|
||||
protected void applyRules(ApplyColumnRulesSession applyColumnRulesSession) {
|
||||
ExpressionServiceAsync.INSTANCE.startApplyColumnRules(applyColumnRulesSession, new AsyncCallback<String>() {
|
||||
protected void applyRules(ApplyAndDetachColumnRulesSession applyColumnRulesSession) {
|
||||
ExpressionServiceAsync.INSTANCE.startApplyAndDetachColumnRules(applyColumnRulesSession, new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -110,7 +110,11 @@ public class RuleApplyDialog extends Window implements
|
|||
|
||||
@Override
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
if(taskId!=null){
|
||||
openMonitorDialog(taskId);
|
||||
} else {
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalExcept
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.AppliedRulesResponseData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyColumnRulesSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.ApplyAndDetachColumnRulesSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleDescriptionData;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
|
@ -547,8 +547,14 @@ public class RuleApplyPanel extends FramedPanel {
|
|||
rulesThatWillBeApplied.add(ruleSelected);
|
||||
}
|
||||
}
|
||||
|
||||
ApplyColumnRulesSession applyColumnRulesSession = new ApplyColumnRulesSession(
|
||||
|
||||
if(rulesThatWillBeApplied.size()<=0&&rulesThatWillBeDetach.size()<=0){
|
||||
Log.error("Select a rule!");
|
||||
UtilsGXT3.alert("Attention", "Select a rule!");
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyAndDetachColumnRulesSession applyColumnRulesSession = new ApplyAndDetachColumnRulesSession(
|
||||
trId, column, rulesThatWillBeApplied, rulesThatWillBeDetach);
|
||||
parent.applyRules(applyColumnRulesSession);
|
||||
|
||||
|
|
Loading…
Reference in New Issue