use of org.pentaho.gwt.widgets.client.dialogs.MessageDialogBox in project pentaho-platform by pentaho.
the class FilePropertiesDialog method getAcls.
/**
* @param fileSummary
*/
protected void getAcls(RepositoryFile fileSummary) {
// $NON-NLS-1$ //$NON-NLS-2$
String url = contextURL + "api/repo/files/" + SolutionBrowserPanel.pathToId(fileSummary.getPath()) + "/acl";
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
// This header is required to force Internet Explorer to not cache values from the GET response.
builder.setHeader("If-Modified-Since", "01 Jan 1970 00:00:00 GMT");
try {
builder.sendRequest(null, new RequestCallback() {
public void onError(Request request, Throwable exception) {
MessageDialogBox dialogBox = // $NON-NLS-1$
new MessageDialogBox(Messages.getString("error"), exception.getLocalizedMessage(), false, false, true);
dialogBox.center();
}
public void onResponseReceived(Request request, Response response) {
if (response.getStatusCode() == Response.SC_OK) {
generalTab.setAclResponse(response);
if (permissionsTab != null) {
permissionsTab.setAclResponse(response);
}
} else {
MessageDialogBox dialogBox = new MessageDialogBox(Messages.getString("error"), Messages.getString("serverErrorColon") + " " + response.getStatusCode(), false, false, // $NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
true);
dialogBox.center();
}
}
});
} catch (RequestException e) {
MessageDialogBox dialogBox = // $NON-NLS-1$
new MessageDialogBox(Messages.getString("error"), e.getLocalizedMessage(), false, false, true);
dialogBox.center();
}
}
use of org.pentaho.gwt.widgets.client.dialogs.MessageDialogBox in project pentaho-platform by pentaho.
the class FilePropertiesDialog method getMetadata.
/**
* @param fileSummary
*/
protected void getMetadata(RepositoryFile fileSummary) {
String metadataUrl = contextURL + "api/repo/files/" + SolutionBrowserPanel.pathToId(fileSummary.getPath()) + "/metadata?cb=" + // $NON-NLS-1$ //$NON-NLS-2$
System.currentTimeMillis();
RequestBuilder metadataBuilder = new RequestBuilder(RequestBuilder.GET, metadataUrl);
// This header is required to force Internet Explorer to not cache values from the GET response.
metadataBuilder.setHeader("If-Modified-Since", "01 Jan 1970 00:00:00 GMT");
metadataBuilder.setHeader("accept", "application/json");
try {
metadataBuilder.sendRequest(null, new RequestCallback() {
public void onError(Request request, Throwable exception) {
MessageDialogBox dialogBox = // $NON-NLS-1$
new MessageDialogBox(Messages.getString("error"), exception.getLocalizedMessage(), false, false, true);
dialogBox.center();
}
public void onResponseReceived(Request request, Response response) {
if (response.getStatusCode() == Response.SC_OK) {
if (response.getText() != null && !"".equals(response.getText()) && !response.getText().equals("null")) {
generalTab.setMetadataResponse(response);
}
} else {
MessageDialogBox dialogBox = new MessageDialogBox(Messages.getString("error"), Messages.getString("serverErrorColon") + " " + response.getStatusCode(), false, false, // $NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
true);
dialogBox.center();
}
}
});
} catch (RequestException e) {
MessageDialogBox dialogBox = // $NON-NLS-1$
new MessageDialogBox(Messages.getString("error"), e.getLocalizedMessage(), false, false, true);
dialogBox.center();
}
}
use of org.pentaho.gwt.widgets.client.dialogs.MessageDialogBox in project data-access by pentaho.
the class DatasourceAdminDialogController method showErrorDialog.
private void showErrorDialog(String titleKey, String messageKey) {
MessageDialogBox b = new MessageDialogBox(messageBundle.getString(titleKey), messageBundle.getString(messageKey), false, false, true, messageBundle.getString("dialog.button.ok"));
b.getElement().getStyle().setZIndex(Short.MAX_VALUE);
b.center();
b.show();
}
Aggregations