Added UtilsGXT3
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@93273 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0f6f78ab45
commit
18ae973fdc
|
@ -16,6 +16,7 @@ import org.gcube.portlets.user.td.columnwidget.client.store.ColumnTypeCodeElemen
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnTypeCodeStore;
|
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnTypeCodeStore;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeElement;
|
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeElement;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeStore;
|
import org.gcube.portlets.user.td.columnwidget.client.store.TimeDimensionTypeStore;
|
||||||
|
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.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||||
|
@ -554,7 +555,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.error("load combo failure:"
|
Log.error("load combo failure:"
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
alert("Error",
|
UtilsGXT3.alert("Error",
|
||||||
"Error retrieving columns of tabular resource:"
|
"Error retrieving columns of tabular resource:"
|
||||||
+ trId.getId());
|
+ trId.getId());
|
||||||
callback.onFailure(caught);
|
callback.onFailure(caught);
|
||||||
|
@ -652,11 +653,11 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
.setColumnDataTypeTarget(dataType);
|
.setColumnDataTypeTarget(dataType);
|
||||||
callChangeColumnType();
|
callChangeColumnType();
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Column data type not selected!");
|
UtilsGXT3.alert("Attention", "Column data type not selected!");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Column data type not selected!");
|
UtilsGXT3.alert("Attention", "Column data type not selected!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ATTRIBUTE:
|
case ATTRIBUTE:
|
||||||
|
@ -671,10 +672,10 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
.setColumnDataTypeTarget(dataType);
|
.setColumnDataTypeTarget(dataType);
|
||||||
callChangeColumnType();
|
callChangeColumnType();
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Column data type not selected!");
|
UtilsGXT3.alert("Attention", "Column data type not selected!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Column data type not selected!");
|
UtilsGXT3.alert("Attention", "Column data type not selected!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CODE:
|
case CODE:
|
||||||
|
@ -702,7 +703,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
.setCodelistColumnReference(columnReference);
|
.setCodelistColumnReference(columnReference);
|
||||||
callChangeColumnType();
|
callChangeColumnType();
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "No column reference selected!");
|
UtilsGXT3.alert("Attention", "No column reference selected!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TIMEDIMENSION:
|
case TIMEDIMENSION:
|
||||||
|
@ -717,23 +718,23 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
.setTimeDimensionType(timeDimensionType);
|
.setTimeDimensionType(timeDimensionType);
|
||||||
callChangeColumnType();
|
callChangeColumnType();
|
||||||
} else {
|
} else {
|
||||||
alert("Attention",
|
UtilsGXT3.alert("Attention",
|
||||||
"Time Dimension type not selected!");
|
"Time Dimension type not selected!");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Time Dimension type not selected!");
|
UtilsGXT3.alert("Attention", "Time Dimension type not selected!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
alert("Attention", "This column type is not supported now!");
|
UtilsGXT3.alert("Attention", "This column type is not supported now!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Select a column type!");
|
UtilsGXT3.alert("Attention", "Select a column type!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Select a column!");
|
UtilsGXT3.alert("Attention", "Select a column!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,7 +744,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.debug("Change Column Type Error: "
|
Log.debug("Change Column Type Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
alert("Change Column Type Error ",
|
UtilsGXT3.alert("Change Column Type Error ",
|
||||||
"Error in invocation of change column type operation!");
|
"Error in invocation of change column type operation!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -757,17 +758,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void alert(String title, String message) {
|
|
||||||
final AlertMessageBox d = new AlertMessageBox(title, message);
|
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void callDialogCodelistSelection() {
|
protected void callDialogCodelistSelection() {
|
||||||
DialogCodelistSelection dialogCodelistSelection = new DialogCodelistSelection(
|
DialogCodelistSelection dialogCodelistSelection = new DialogCodelistSelection(
|
||||||
|
@ -805,7 +796,7 @@ public class ChangeColumnTypePanel extends FramedPanel implements
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.debug("Error retrieving columns: "
|
Log.debug("Error retrieving columns: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
alert("Error retrieving columns",
|
UtilsGXT3.alert("Error retrieving columns",
|
||||||
"Error retrieving columns on server!");
|
"Error retrieving columns on server!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.progress.DeleteColumnProgressDialog;
|
import org.gcube.portlets.user.td.columnwidget.client.progress.DeleteColumnProgressDialog;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
||||||
|
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.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.DeleteColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.DeleteColumnSession;
|
||||||
|
@ -233,7 +234,7 @@ public class DeleteColumnPanel extends FramedPanel {
|
||||||
if(columnData!=null){
|
if(columnData!=null){
|
||||||
callDeleteColumn();
|
callDeleteColumn();
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Select a column!");
|
UtilsGXT3.alert("Attention", "Select a column!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +245,7 @@ public class DeleteColumnPanel extends FramedPanel {
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.debug("Delete Column Error: "
|
Log.debug("Delete Column Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
alert("Delete Column Error ",
|
UtilsGXT3.alert("Delete Column Error ",
|
||||||
"Error in invocation of delete column operation!");
|
"Error in invocation of delete column operation!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -257,16 +258,6 @@ public class DeleteColumnPanel extends FramedPanel {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void alert(String title, String message) {
|
|
||||||
final AlertMessageBox d = new AlertMessageBox(title, message);
|
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.progress.LabelColumnProgressDialog;
|
import org.gcube.portlets.user.td.columnwidget.client.progress.LabelColumnProgressDialog;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
||||||
|
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.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.LabelColumnSession;
|
||||||
|
@ -29,12 +30,9 @@ import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
|
||||||
import com.sencha.gxt.data.shared.loader.ListLoader;
|
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.widget.core.client.FramedPanel;
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||||
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.ComboBox;
|
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
||||||
|
@ -180,16 +178,9 @@ public class LabelColumnPanel extends FramedPanel {
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.error("load combo failure:"
|
Log.error("load combo failure:"
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
AlertMessageBox d = new AlertMessageBox("Error",
|
UtilsGXT3.alert("Error",
|
||||||
"Error retrieving columns of tabular resource:"
|
"Error retrieving columns of tabular resource:"
|
||||||
+ trId.getId());
|
+ trId.getId());
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
callback.onFailure(caught);
|
callback.onFailure(caught);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,10 +234,10 @@ public class LabelColumnPanel extends FramedPanel {
|
||||||
labelColumnSession.setLabel(columnData.getLabel());
|
labelColumnSession.setLabel(columnData.getLabel());
|
||||||
callLabelColumn();
|
callLabelColumn();
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Insert a valid label!");
|
UtilsGXT3.alert("Attention", "Insert a valid label!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert("Attention", "Select a column!");
|
UtilsGXT3.alert("Attention", "Select a column!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +248,7 @@ public class LabelColumnPanel extends FramedPanel {
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.debug("Change The Column Label Error: "
|
Log.debug("Change The Column Label Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
alert("Error Changing The Column Label",
|
UtilsGXT3.alert("Error Changing The Column Label",
|
||||||
"Error in invocation of Change The Column Label operation!");
|
"Error in invocation of Change The Column Label operation!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -270,16 +261,6 @@ public class LabelColumnPanel extends FramedPanel {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void alert(String title, String message) {
|
|
||||||
final AlertMessageBox d = new AlertMessageBox(title, message);
|
|
||||||
d.addHideHandler(new HideHandler() {
|
|
||||||
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
d.show();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue