Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@93417 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fd64d5c546
commit
3742bdc73f
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client.progress;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.template.TemplateApplySession;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.template.TemplateApplyDialog;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||
|
@ -31,14 +31,14 @@ public class TemplateApplyProgressDialog extends Window implements TemplateApply
|
|||
public static final int STATUS_POLLING_DELAY = 1000;
|
||||
protected String WIDTH = "400px";
|
||||
protected String HEIGHT = "120px";
|
||||
protected TemplateApplySession templateApplySession;
|
||||
protected TemplateApplyDialog templateApplyDialog;
|
||||
protected EventBus eventBus;
|
||||
protected TemplateApplyProgressUpdater progressUpdater;
|
||||
protected TextButton ok;
|
||||
protected TRId trId;
|
||||
|
||||
public TemplateApplyProgressDialog(TemplateApplySession templateApplySession, EventBus eventBus) {
|
||||
this.templateApplySession=templateApplySession;
|
||||
public TemplateApplyProgressDialog(TemplateApplyDialog templateApplySession, EventBus eventBus) {
|
||||
this.templateApplyDialog=templateApplySession;
|
||||
this.eventBus=eventBus;
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
package org.gcube.portlets.user.td.tablewidget.client.template;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.template.TemplateApplySession;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.progress.TemplateApplyProgressDialog;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.widget.core.client.Window;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
|
@ -18,10 +24,13 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
public class TemplateApplyDialog extends Window {
|
||||
protected String WIDTH = "650px";
|
||||
protected String HEIGHT = "530px";
|
||||
|
||||
|
||||
protected TemplateApplySession templateApplySession;
|
||||
protected TRId trId;
|
||||
protected EventBus eventBus;
|
||||
|
||||
public TemplateApplyDialog(TRId trId, EventBus eventBus) {
|
||||
this.trId=trId;
|
||||
this.eventBus=eventBus;
|
||||
initWindow();
|
||||
|
||||
TemplateApplyPanel templateApplyPanel= new TemplateApplyPanel(this,trId, eventBus);
|
||||
|
@ -59,11 +68,43 @@ public class TemplateApplyDialog extends Window {
|
|||
}
|
||||
|
||||
protected void close (){
|
||||
/*ExpressionEvent expressionEvent = new ExpressionEvent(
|
||||
ExpressionType.EXPRESSIONNULL);
|
||||
//Log.debug(expressionEvent.toString());*/
|
||||
hide();
|
||||
//eventBus.fireEvent(expressionEvent);
|
||||
}
|
||||
|
||||
|
||||
protected void applyTemplate(final TemplateApplySession templateApplySession){
|
||||
this.templateApplySession=templateApplySession;
|
||||
|
||||
TDGWTServiceAsync.INSTANCE.startTemplateApply(templateApplySession,
|
||||
new AsyncCallback<Void>() {
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.debug("Apply Template Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Apply Template Error ",
|
||||
"Error in invocation of apply template operation!");
|
||||
|
||||
}
|
||||
|
||||
public void onSuccess(Void result) {
|
||||
callApplyTemplateProgressDialog();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected void callApplyTemplateProgressDialog() {
|
||||
TemplateApplyProgressDialog d = new TemplateApplyProgressDialog(
|
||||
this, eventBus);
|
||||
d.show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class TemplateApplyPanel extends FramedPanel {
|
|||
protected EventBus eventBus;
|
||||
protected TemplateApplyDialog parent;
|
||||
protected TRId trId;
|
||||
|
||||
protected TemplateApplySession templateApplySession;
|
||||
|
||||
private TextButton btnApply;
|
||||
private TextButton btnClose;
|
||||
|
@ -230,31 +230,15 @@ public class TemplateApplyPanel extends FramedPanel {
|
|||
|
||||
|
||||
protected void apply(){
|
||||
TemplateApplySession applyTemplateSession=new TemplateApplySession();
|
||||
applyTemplateSession.setTemplateData(getSelectedItem());
|
||||
applyTemplateSession.setTrId(trId);
|
||||
Log.debug("applyTemplateSession: "+applyTemplateSession);
|
||||
templateApplySession=new TemplateApplySession();
|
||||
templateApplySession.setTemplateData(getSelectedItem());
|
||||
templateApplySession.setTrId(trId);
|
||||
Log.debug("applyTemplateSession: "+templateApplySession);
|
||||
parent.applyTemplate(templateApplySession);
|
||||
|
||||
TDGWTServiceAsync.INSTANCE.startTemplateApply(applyTemplateSession,
|
||||
new AsyncCallback<Void>() {
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.debug("Apply Template Error: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Apply Template Error ",
|
||||
"Error in invocation of apply template operation!");
|
||||
|
||||
}
|
||||
|
||||
public void onSuccess(Void result) {
|
||||
/*TemplateApplyProgressDialog = new ChangeColumnTypeProgressDialog(
|
||||
changeColumnTypeSession, eventBus);*/
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void close(){
|
||||
parent.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue