Updated Position Column
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@113451 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a78e6d2754
commit
c3be7e6a5b
|
@ -12,11 +12,13 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedExcep
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.ChangeColumnsPositionSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.ChangeColumnsPositionSession;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableWhy;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
import com.sencha.gxt.dnd.core.client.DndDragStartEvent.DndDragStartHandler;
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.core.client.Scheduler;
|
import com.google.gwt.core.client.Scheduler;
|
||||||
|
@ -40,6 +42,7 @@ import com.sencha.gxt.data.shared.loader.ListLoader;
|
||||||
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
||||||
import com.sencha.gxt.dnd.core.client.DND.Feedback;
|
import com.sencha.gxt.dnd.core.client.DND.Feedback;
|
||||||
import com.sencha.gxt.dnd.core.client.DndDragStartEvent;
|
import com.sencha.gxt.dnd.core.client.DndDragStartEvent;
|
||||||
|
import com.sencha.gxt.dnd.core.client.DndDragStartEvent.DndDragStartHandler;
|
||||||
import com.sencha.gxt.dnd.core.client.GridDragSource;
|
import com.sencha.gxt.dnd.core.client.GridDragSource;
|
||||||
import com.sencha.gxt.dnd.core.client.GridDropTarget;
|
import com.sencha.gxt.dnd.core.client.GridDropTarget;
|
||||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||||
|
@ -50,7 +53,6 @@ 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.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.FieldLabel;
|
|
||||||
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
||||||
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||||
import com.sencha.gxt.widget.core.client.grid.Grid;
|
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||||
|
@ -294,9 +296,9 @@ public class PositionColumnPanel extends FramedPanel {
|
||||||
changeColumnsPositionSession = new ChangeColumnsPositionSession(trId, columns);
|
changeColumnsPositionSession = new ChangeColumnsPositionSession(trId, columns);
|
||||||
|
|
||||||
Log.debug("ChangeColumnsSession: "+changeColumnsPositionSession);
|
Log.debug("ChangeColumnsSession: "+changeColumnsPositionSession);
|
||||||
/*
|
|
||||||
TDGWTServiceAsync.INSTANCE.startChangeColumnsPosition(changeColumnsPositionSession,
|
TDGWTServiceAsync.INSTANCE.startChangeColumnsPosition(changeColumnsPositionSession,
|
||||||
new AsyncCallback<String>() {
|
new AsyncCallback<Void>() {
|
||||||
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
if (caught instanceof TDGWTSessionExpiredException) {
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
@ -323,14 +325,27 @@ public class PositionColumnPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSuccess(String taskId) {
|
public void onSuccess(Void result) {
|
||||||
|
UtilsGXT3
|
||||||
|
.info("Success", "Positions Updated");
|
||||||
|
syncOpComplete();
|
||||||
|
|
||||||
//openMonitorDialog(taskId);
|
//openMonitorDialog(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void syncOpComplete(){
|
||||||
|
ChangeTableWhy why = ChangeTableWhy.TABLEUPDATED;
|
||||||
|
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||||
|
ChangeTableRequestType.CHANGEPOSITIONCOLUMNS, trId, why);
|
||||||
|
eventBus.fireEvent(changeTableRequestEvent);
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
parent.close();
|
parent.close();
|
||||||
|
|
Loading…
Reference in New Issue