Added UtilsGXT3
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@93272 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a57b4d5c54
commit
0f6f78ab45
|
@ -6,6 +6,7 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
|
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
||||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.CodelistPagingLoadConfig;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.paging.CodelistPagingLoadConfig;
|
||||||
|
@ -27,7 +28,6 @@ import com.google.web.bindery.event.shared.EventBus;
|
||||||
import com.sencha.gxt.core.client.IdentityValueProvider;
|
import com.sencha.gxt.core.client.IdentityValueProvider;
|
||||||
import com.sencha.gxt.core.client.Style.SelectionMode;
|
import com.sencha.gxt.core.client.Style.SelectionMode;
|
||||||
import com.sencha.gxt.core.client.resources.ThemeStyles;
|
import com.sencha.gxt.core.client.resources.ThemeStyles;
|
||||||
import com.sencha.gxt.core.client.util.Point;
|
|
||||||
import com.sencha.gxt.data.client.loader.RpcProxy;
|
import com.sencha.gxt.data.client.loader.RpcProxy;
|
||||||
import com.sencha.gxt.data.shared.ListStore;
|
import com.sencha.gxt.data.shared.ListStore;
|
||||||
import com.sencha.gxt.data.shared.SortDir;
|
import com.sencha.gxt.data.shared.SortDir;
|
||||||
|
@ -39,12 +39,9 @@ import com.sencha.gxt.data.shared.loader.PagingLoadResultBean;
|
||||||
import com.sencha.gxt.data.shared.loader.PagingLoader;
|
import com.sencha.gxt.data.shared.loader.PagingLoader;
|
||||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||||
import com.sencha.gxt.widget.core.client.Window;
|
import com.sencha.gxt.widget.core.client.Window;
|
||||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
import com.sencha.gxt.widget.core.client.form.TextField;
|
import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
|
@ -264,7 +261,7 @@ public class DialogCodelistSelection extends Window {
|
||||||
Log.debug("Error Retrieving Codelist",
|
Log.debug("Error Retrieving Codelist",
|
||||||
caught.getMessage());
|
caught.getMessage());
|
||||||
caught.printStackTrace();
|
caught.printStackTrace();
|
||||||
alert("Error Retrieving Codelist",
|
UtilsGXT3.alert("Error Retrieving Codelist",
|
||||||
"Error retrieving codelist on server");
|
"Error retrieving codelist on server");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -290,7 +287,7 @@ public class DialogCodelistSelection extends Window {
|
||||||
Log.debug("Error in setCodelistsPagingLoader",
|
Log.debug("Error in setCodelistsPagingLoader",
|
||||||
caught.getMessage());
|
caught.getMessage());
|
||||||
caught.printStackTrace();
|
caught.printStackTrace();
|
||||||
alert("Error Retrieving Codelist",
|
UtilsGXT3.alert("Error Retrieving Codelist",
|
||||||
"Error error in retrieving the codelists during the initialization phase!");
|
"Error error in retrieving the codelists during the initialization phase!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -348,17 +345,7 @@ public class DialogCodelistSelection extends Window {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private void alert(String title, String message) {
|
|
||||||
final AlertMessageBox d = new AlertMessageBox(title, message);
|
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.portlets.user.td.columnwidget.client.progress;
|
package org.gcube.portlets.user.td.columnwidget.client.progress;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.type.ChangeColumnTypeSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.type.ChangeColumnTypeSession;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -11,13 +12,10 @@ import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||||
import com.sencha.gxt.widget.core.client.ProgressBar;
|
import com.sencha.gxt.widget.core.client.ProgressBar;
|
||||||
import com.sencha.gxt.widget.core.client.Window;
|
import com.sencha.gxt.widget.core.client.Window;
|
||||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,12 +104,7 @@ public class ChangeColumnTypeProgressDialog extends Window implements ChangeColu
|
||||||
String failureDetails) {
|
String failureDetails) {
|
||||||
ok.setVisible(true);
|
ok.setVisible(true);
|
||||||
this.trId=null;
|
this.trId=null;
|
||||||
AlertMessageBox d = new AlertMessageBox("Error changing the column type", reason);
|
UtilsGXT3.alert("Error changing the column type", reason);
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateInvocation(){
|
public void updateInvocation(){
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.portlets.user.td.columnwidget.client.progress;
|
package org.gcube.portlets.user.td.columnwidget.client.progress;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.DeleteColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.DeleteColumnSession;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -11,13 +12,10 @@ import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||||
import com.sencha.gxt.widget.core.client.ProgressBar;
|
import com.sencha.gxt.widget.core.client.ProgressBar;
|
||||||
import com.sencha.gxt.widget.core.client.Window;
|
import com.sencha.gxt.widget.core.client.Window;
|
||||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,12 +104,8 @@ public class DeleteColumnProgressDialog extends Window implements DeleteColumnPr
|
||||||
String failureDetails) {
|
String failureDetails) {
|
||||||
ok.setVisible(true);
|
ok.setVisible(true);
|
||||||
this.trId=null;
|
this.trId=null;
|
||||||
AlertMessageBox d = new AlertMessageBox("Error Deleting Column", reason);
|
UtilsGXT3.alert("Error Deleting Column", reason);
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateInvocation(){
|
public void updateInvocation(){
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.portlets.user.td.columnwidget.client.progress;
|
package org.gcube.portlets.user.td.columnwidget.client.progress;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -107,12 +108,8 @@ public class LabelColumnProgressDialog extends Window implements LabelColumnProg
|
||||||
String failureDetails) {
|
String failureDetails) {
|
||||||
ok.setVisible(true);
|
ok.setVisible(true);
|
||||||
this.trId=null;
|
this.trId=null;
|
||||||
AlertMessageBox d = new AlertMessageBox("Error Changing The Column Label", reason);
|
UtilsGXT3.alert("Error Changing The Column Label", reason);
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateInvocation(){
|
public void updateInvocation(){
|
||||||
|
|
Loading…
Reference in New Issue