Search in sources :

Example 1 with ImportDialog

use of org.pentaho.mantle.client.dialogs.ImportDialog in project pentaho-platform by pentaho.

the class ImportFileCommand method performOperation.

protected void performOperation(boolean feedback) {
    // delete file
    importDialog = new ImportDialog(repositoryFile, SolutionBrowserPanel.getInstance().isAdministrator());
    importDialog.getForm().addSubmitCompleteHandler(new SubmitCompleteHandler() {

        @Override
        public void onSubmitComplete(SubmitCompleteEvent sce) {
            new RefreshRepositoryCommand().execute(false);
        }
    });
    final IDialogCallback callback = new IDialogCallback() {

        public void cancelPressed() {
            importDialog.hide();
        }

        public void okPressed() {
            importDialog.getForm().submit();
        }
    };
    importDialog.setCallback(callback);
    importDialog.center();
}
Also used : ImportDialog(org.pentaho.mantle.client.dialogs.ImportDialog) SubmitCompleteEvent(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent) SubmitCompleteHandler(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler) IDialogCallback(org.pentaho.gwt.widgets.client.dialogs.IDialogCallback)

Aggregations

SubmitCompleteEvent (com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent)1 SubmitCompleteHandler (com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler)1 IDialogCallback (org.pentaho.gwt.widgets.client.dialogs.IDialogCallback)1 ImportDialog (org.pentaho.mantle.client.dialogs.ImportDialog)1