Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@93421 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-21 13:32:27 +00:00
parent f631ac52f7
commit b32be01fe3
1 changed files with 20 additions and 16 deletions

View File

@ -20,11 +20,10 @@ 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;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/** /**
* *
* @author "Giancarlo Panichi" * @author "Giancarlo Panichi" <a
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> * href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* *
*/ */
public class ColumnFilterDialog extends Window { public class ColumnFilterDialog extends Window {
@ -80,7 +79,6 @@ public class ColumnFilterDialog extends Window {
closeBtn.addSelectHandler(new SelectHandler() { closeBtn.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) { public void onSelect(SelectEvent event) {
close(); close();
} }
@ -139,14 +137,21 @@ public class ColumnFilterDialog extends Window {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
Log.error("Error retrieving column: " Log.error("Error retrieving column: "
+ caught.getMessage()); + caught.getMessage());
UtilsGXT3.alert("Error retrieving column", caught.getMessage()); UtilsGXT3.alert("Error retrieving column",
caught.getMessage());
} }
public void onSuccess(ColumnData result) { public void onSuccess(ColumnData result) {
Log.debug("Retrived column: " + result); Log.debug("Retrived column: " + result);
if (result.isViewColumn()) {
UtilsGXT3.info("View Column",
"You can not make expressions on view column for now");
hide();
} else {
column = result; column = result;
create(); create();
} }
}
}); });
@ -168,10 +173,10 @@ public class ColumnFilterDialog extends Window {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
Log.error("Error submitting the column filter: " Log.error("Error submitting the column filter: "
+ caught.getMessage()+ " "+caught.getCause()); + caught.getMessage() + " " + caught.getCause());
caught.printStackTrace(); caught.printStackTrace();
UtilsGXT3.alert("Error submitting the column filter", caught UtilsGXT3.alert("Error submitting the column filter",
.getMessage()); caught.getMessage());
} }
}); });
@ -183,5 +188,4 @@ public class ColumnFilterDialog extends Window {
dialog.show(); dialog.show();
} }
} }