Fixed Error Management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-wizard-widget@101909 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
204fa335e2
commit
6dbe48e6ce
|
@ -6,7 +6,6 @@ package org.gcube.portlets.user.td.wizardwidget.client;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundle;
|
import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundle;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
import com.sencha.gxt.widget.core.client.Component;
|
import com.sencha.gxt.widget.core.client.Component;
|
||||||
|
@ -263,9 +262,9 @@ public class WizardCard extends BorderLayoutContainer {
|
||||||
return (indexPosition>=0)?indexPosition+1:indexPosition;
|
return (indexPosition>=0)?indexPosition+1:indexPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showErrorAndHide(String title, final String message, final Throwable throwable)
|
public void showErrorAndHide(String title, final String message, String details, final Throwable throwable)
|
||||||
{
|
{
|
||||||
wizardWindow.showErrorAndHide(title, message, throwable);
|
wizardWindow.showErrorAndHide(title, message, details, throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hideWindow()
|
public void hideWindow()
|
||||||
|
|
|
@ -32,10 +32,11 @@ public interface WizardListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the something in the wizard is failed.
|
* Called when the something in the wizard is failed.
|
||||||
* @param title TODO
|
* @param title
|
||||||
* @param message the failure reason or <code>null</code>.
|
* @param message the failure reason.
|
||||||
* @param throwable the exception or <code>null</code>.
|
* @param details the failure details.
|
||||||
|
* @param throwable the exception.
|
||||||
*/
|
*/
|
||||||
public void failed(String title, String message, Throwable throwable);
|
public void failed(String title, String message, String details, Throwable throwable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ import com.google.gwt.core.client.Callback;
|
||||||
import com.google.gwt.event.dom.client.KeyCodes;
|
import com.google.gwt.event.dom.client.KeyCodes;
|
||||||
import com.google.gwt.user.client.Command;
|
import com.google.gwt.user.client.Command;
|
||||||
import com.google.gwt.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
|
|
||||||
import com.google.gwt.user.client.Event;
|
import com.google.gwt.user.client.Event;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
|
@ -467,13 +466,13 @@ public class WizardWindow extends Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showErrorAndHide(final String title, final String message,
|
public void showErrorAndHide(final String title, final String message,
|
||||||
final Throwable throwable) {
|
final String details, final Throwable throwable) {
|
||||||
UtilsGXT3.alert(title, message, new Callback<Component, Void>() {
|
UtilsGXT3.alert(title, message+" "+details, new Callback<Component, Void>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Void reason) {
|
public void onFailure(Void reason) {
|
||||||
hide();
|
hide();
|
||||||
fireFailed(title, message, throwable);
|
fireFailed(title, message, details, throwable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,8 +502,8 @@ public class WizardWindow extends Window {
|
||||||
listener.aborted();
|
listener.aborted();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fireFailed(String title, String message, Throwable throwable) {
|
public void fireFailed(String title, String message, String details, Throwable throwable) {
|
||||||
for (WizardListener listener : listeners)
|
for (WizardListener listener : listeners)
|
||||||
listener.failed(title, message, throwable);
|
listener.failed(title, message, details, throwable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue