Search in sources :

Example 21 with IDialogCallback

use of org.pentaho.gwt.widgets.client.dialogs.IDialogCallback in project pentaho-platform by pentaho.

the class ManageContentCommand method performOperation.

protected void performOperation(boolean feedback) {
    final ManageContentDialog dialog = new ManageContentDialog();
    dialog.setCallback(new IDialogCallback() {

        public void okPressed() {
            if (dialog.getState() == ManageContentDialog.STATE.EDIT) {
                OpenFileCommand cmd = new OpenFileCommand(FileCommand.COMMAND.EDIT);
                cmd.execute();
            } else if (dialog.getState() == ManageContentDialog.STATE.SHARE) {
                OpenFileCommand cmd = new OpenFileCommand(FileCommand.COMMAND.SHARE);
                cmd.execute();
            } else if (dialog.getState() == ManageContentDialog.STATE.SCHEDULE) {
                OpenFileCommand cmd = new OpenFileCommand(FileCommand.COMMAND.SCHEDULE_NEW);
                cmd.execute();
            }
        }

        public void cancelPressed() {
        }
    });
    dialog.center();
}
Also used : IDialogCallback(org.pentaho.gwt.widgets.client.dialogs.IDialogCallback) ManageContentDialog(org.pentaho.mantle.client.dialogs.ManageContentDialog)

Aggregations

IDialogCallback (org.pentaho.gwt.widgets.client.dialogs.IDialogCallback)21 PromptDialogBox (org.pentaho.gwt.widgets.client.dialogs.PromptDialogBox)11 MessageDialogBox (org.pentaho.gwt.widgets.client.dialogs.MessageDialogBox)9 Request (com.google.gwt.http.client.Request)8 RequestBuilder (com.google.gwt.http.client.RequestBuilder)8 RequestCallback (com.google.gwt.http.client.RequestCallback)8 RequestException (com.google.gwt.http.client.RequestException)8 Response (com.google.gwt.http.client.Response)8 Label (com.google.gwt.user.client.ui.Label)7 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)7 HTML (com.google.gwt.user.client.ui.HTML)6 TextBox (com.google.gwt.user.client.ui.TextBox)3 IFrameTabPanel (org.pentaho.mantle.client.solutionbrowser.tabs.IFrameTabPanel)3 JSONString (com.google.gwt.json.client.JSONString)2 Command (com.google.gwt.user.client.Command)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 List (java.util.List)2 OverwritePromptDialog (org.pentaho.mantle.client.dialogs.OverwritePromptDialog)2 SolutionBrowserFile (org.pentaho.mantle.client.solutionbrowser.SolutionBrowserFile)2