use of org.pentaho.ui.xul.gwt.tags.GwtMessageBox in project pentaho-platform by pentaho.
the class UserDialog method showErrorMessage.
private void showErrorMessage(String userName, String reservedCharacters) {
GwtMessageBox messageBox = new GwtMessageBox();
messageBox.setTitle(Messages.getString("error"));
messageBox.setMessage(Messages.getString("prohibitedNameSymbols", userName, reservedCharacters));
messageBox.setButtons(new Object[GwtMessageBox.ACCEPT]);
messageBox.setWidth(300);
messageBox.show();
}
use of org.pentaho.ui.xul.gwt.tags.GwtMessageBox in project pentaho-platform by pentaho.
the class UserRolesAdminPanelController method showXulErrorMessage.
private void showXulErrorMessage(String title, String message) {
GwtMessageBox messageBox = new GwtMessageBox();
messageBox.setTitle(title);
messageBox.setMessage(message);
messageBox.setButtons(new Object[GwtMessageBox.ACCEPT]);
messageBox.setWidth(520);
messageBox.show();
}
use of org.pentaho.ui.xul.gwt.tags.GwtMessageBox in project pentaho-platform by pentaho.
the class MantleController method executeAdminContent.
private void executeAdminContent() {
try {
RequestCallback internalCallback = new RequestCallback() {
public void onError(Request request, Throwable exception) {
}
public void onResponseReceived(Request request, Response response) {
JsArray<JsSetting> jsSettings = null;
try {
jsSettings = JsSetting.parseSettingsJson(response.getText());
} catch (Throwable t) {
// happens when there are no settings
}
if (jsSettings == null) {
return;
}
for (int i = 0; i < jsSettings.length(); i++) {
String content = jsSettings.get(i).getValue();
// $NON-NLS-1$
StringTokenizer nameValuePairs = new StringTokenizer(content, ";");
String perspective = null, content_panel_id = null, content_url = null;
for (int j = 0; j < nameValuePairs.countTokens(); j++) {
String currentToken = nameValuePairs.tokenAt(j).trim();
if (currentToken.startsWith("perspective=")) {
// $NON-NLS-1$
// $NON-NLS-1$
perspective = currentToken.substring("perspective=".length());
}
if (currentToken.startsWith("content-panel-id=")) {
// $NON-NLS-1$
// $NON-NLS-1$
content_panel_id = currentToken.substring("content-panel-id=".length());
}
if (currentToken.startsWith("content-url=")) {
// $NON-NLS-1$
// $NON-NLS-1$
content_url = currentToken.substring("content-url=".length());
}
}
if (content_panel_id != null && content_url != null) {
overrideContentPanelId = content_panel_id;
overrideContentUrl = content_url;
}
if (perspective != null) {
PerspectiveManager.getInstance().setPerspective(perspective);
}
if (perspective == null && content_panel_id == null && content_url == null) {
GwtMessageBox warning = new GwtMessageBox();
// $NON-NLS-1$
warning.setTitle(Messages.getString("warning"));
warning.setMessage(content);
warning.setButtons(new Object[GwtMessageBox.ACCEPT]);
// $NON-NLS-1$
warning.setAcceptLabel(Messages.getString("close"));
warning.show();
}
}
}
};
RequestBuilder builder = // $NON-NLS-1$
new RequestBuilder(RequestBuilder.GET, GWT.getHostPageBaseURL() + "api/mantle/getAdminContent");
builder.setHeader("If-Modified-Since", "01 Jan 1970 00:00:00 GMT");
// $NON-NLS-1$ //$NON-NLS-2$
builder.setHeader("accept", "application/json");
builder.sendRequest(null, internalCallback);
// TO DO Reset the menuItem click for browser and workspace here?
} catch (RequestException e) {
// ignore
}
}
use of org.pentaho.ui.xul.gwt.tags.GwtMessageBox in project data-access by pentaho.
the class MetadataImportDialogController method showMessagebox.
/**
* Shows an informational dialog
*
* @param title title of dialog
* @param message message within dialog
*/
private void showMessagebox(final String title, final String message) {
XulMessageBox messagebox = new GwtMessageBox() {
@Override
public void hide() {
super.hide();
if (importCompleteCallback != null) {
importCompleteCallback.onImportSuccess();
}
}
};
messagebox.setTitle(title);
messagebox.setMessage(message);
messagebox.open();
}
Aggregations