diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnFilterDialog.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnFilterDialog.java
index 486291a..d111dd0 100644
--- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnFilterDialog.java
+++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnFilterDialog.java
@@ -20,12 +20,11 @@ import com.sencha.gxt.widget.core.client.Window;
import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
-
/**
*
- * @author "Giancarlo Panichi"
- * g.panichi@isti.cnr.it
- *
+ * @author "Giancarlo Panichi" g.panichi@isti.cnr.it
+ *
*/
public class ColumnFilterDialog extends Window {
protected String WIDTH = "660px";
@@ -70,7 +69,7 @@ public class ColumnFilterDialog extends Window {
getHeader().setIcon(ExpressionResources.INSTANCE.filter());
}
-
+
/**
* {@inheritDoc}
*/
@@ -80,7 +79,6 @@ public class ColumnFilterDialog extends Window {
closeBtn.addSelectHandler(new SelectHandler() {
-
public void onSelect(SelectEvent event) {
close();
}
@@ -104,7 +102,7 @@ public class ColumnFilterDialog extends Window {
columnExpressionPanel = new ColumnExpressionPanel(this, column,
eventBus);
add(columnExpressionPanel);
-
+
} else {
HTML errorMessage = new HTML(
"This type of column is not supported for now!");
@@ -139,13 +137,20 @@ public class ColumnFilterDialog extends Window {
public void onFailure(Throwable caught) {
Log.error("Error retrieving column: "
+ caught.getMessage());
- UtilsGXT3.alert("Error retrieving column", caught.getMessage());
+ UtilsGXT3.alert("Error retrieving column",
+ caught.getMessage());
}
public void onSuccess(ColumnData result) {
Log.debug("Retrived column: " + result);
- column = result;
- create();
+ if (result.isViewColumn()) {
+ UtilsGXT3.info("View Column",
+ "You can not make expressions on view column for now");
+ hide();
+ } else {
+ column = result;
+ create();
+ }
}
});
@@ -155,7 +160,7 @@ public class ColumnFilterDialog extends Window {
protected void callApplyFilter() {
columnFilterSession = new ColumnFilterSession(column, exp);
Log.debug(columnFilterSession.toString());
-
+
ExpressionServiceAsync.INSTANCE.submitColumnFilter(columnFilterSession,
new AsyncCallback() {
@@ -168,10 +173,10 @@ public class ColumnFilterDialog extends Window {
@Override
public void onFailure(Throwable caught) {
Log.error("Error submitting the column filter: "
- + caught.getMessage()+ " "+caught.getCause());
+ + caught.getMessage() + " " + caught.getCause());
caught.printStackTrace();
- UtilsGXT3.alert("Error submitting the column filter", caught
- .getMessage());
+ UtilsGXT3.alert("Error submitting the column filter",
+ caught.getMessage());
}
});
@@ -182,6 +187,5 @@ public class ColumnFilterDialog extends Window {
dialog = new ColumnFilterProgressDialog(this, eventBus);
dialog.show();
}
-
-
+
}