Package org.pentaho.gwt.widgets.client.dialogs

Examples of org.pentaho.gwt.widgets.client.dialogs.MessageDialogBox


    try {
      addBlockoutPeriodRequest.sendRequest( addBlockoutParams.toString(), new RequestCallback() {
        @Override
        public void onError( Request request, Throwable exception ) {
          MessageDialogBox dialogBox =
              new MessageDialogBox( Messages.getString( "error" ), exception.toString(), false, false, true ); //$NON-NLS-1$
          dialogBox.center();
          setDone( false );
        }

        @Override
        public void onResponseReceived( Request request, Response response ) {
View Full Code Here


    } else {
      conflictMessage.append( Messages.getString( "blockoutTotalConflict" ) ); //$NON-NLS-1$
    }

    if ( isScheduleConflict ) {
      final MessageDialogBox dialogBox =
          new MessageDialogBox( Messages.getString( "blockoutTimeExists" ), //$NON-NLS-1$
              conflictMessage.toString(), false, false, true, updateScheduleButtonText, showContinueButton
                  ? continueButtonText : null, null );
      dialogBox.setCallback( new IDialogCallback() {
        // If user clicked on 'Continue' we want to add the schedule. Otherwise we dismiss the dialog
        // and they have to modify the recurrence schedule
        @Override
        public void cancelPressed() {
          // User clicked on continue, so we need to proceed adding the schedule
          handleWizardPanels( schedule, trigger );
        }

        @Override
        public void okPressed() {
          // Update Schedule Button pressed
          dialogBox.setVisible( false );
        }
      } );

      dialogBox.center();
    }
  }
View Full Code Here

    try {
      blockoutConflictRequest.sendRequest( verifyBlockoutParams.toString(), new RequestCallback() {
        @Override
        public void onError( Request request, Throwable exception ) {
          MessageDialogBox dialogBox =
              new MessageDialogBox( Messages.getString( "error" ), exception.toString(), false, false, true ); //$NON-NLS-1$
          dialogBox.center();
          setDone( false );
        }

        @Override
        public void onResponseReceived( Request request, Response response ) {
View Full Code Here

      try {
        scheduleFileRequestBuilder.sendRequest( scheduleRequest.toString(), new RequestCallback() {
          @Override
          public void onError( Request request, Throwable exception ) {
            MessageDialogBox dialogBox =
                new MessageDialogBox( Messages.getString( "error" ), exception.toString(), false, false, true ); //$NON-NLS-1$
            dialogBox.center();
            setDone( false );
          }

          @Override
          public void onResponseReceived( Request request, Response response ) {
            if ( response.getStatusCode() == 200 ) {
              setDone( true );
              ScheduleRecurrenceDialog.this.hide();
              if ( callback != null ) {
                callback.okPressed();
              }
              if ( showSuccessDialog ) {
                if ( !PerspectiveManager.getInstance().getActivePerspective().getId().equals(
                    PerspectiveManager.SCHEDULES_PERSPECTIVE ) ) {
                  ScheduleCreateStatusDialog successDialog = new ScheduleCreateStatusDialog();
                  successDialog.center();
                } else {
                  MessageDialogBox dialogBox =
                      new MessageDialogBox(
                          Messages.getString( "scheduleUpdatedTitle" ), Messages.getString( "scheduleUpdatedMessage" ), //$NON-NLS-1$ //$NON-NLS-2$
                          false, false, true );
                  dialogBox.center();
                }
              }
            } else {
              MessageDialogBox dialogBox = new MessageDialogBox( Messages.getString( "error" ), //$NON-NLS-1$
                  response.getText(), false, false, true );
              dialogBox.center();
              setDone( false );
            }
          }
        } );
      } catch ( RequestException e ) {
        MessageDialogBox dialogBox = new MessageDialogBox( Messages.getString( "error" ), e.toString(), //$NON-NLS-1$
            false, false, true );
        dialogBox.center();
        setDone( false );
      }

      setDone( true );
    }
View Full Code Here

      } else {
        requestCallback = new RequestCallback() {
          @Override
          public void onError( Request request, Throwable th ) {
            WaitPopup.getInstance().setVisible( false );
            MessageDialogBox dialogBox =
                new MessageDialogBox( Messages.getString( "error" ), th.toString(), false, false, true ); //$NON-NLS-1$
            dialogBox.center();
          }

          @Override
          public void onResponseReceived( Request arg0, Response arg1 ) {
            WaitPopup.getInstance().setVisible( false );
            if ( arg1.getStatusCode() == Response.SC_OK ) {
              dirty = false;
              // Refresh current folder or parent folder
              PerspectiveManager.getInstance().setPerspective( PerspectiveManager.BROWSER_PERSPECTIVE );

              GenericEvent ge = new GenericEvent();
              if ( fileName == null ) { // Filename is null, then it is a folder
                ge.setEventSubType( "RefreshFolderEvent" );
                ge.setStringParam( parentPath );
              } else {
                ge.setEventSubType( "RefreshFileEvent" );

                JSONObject strParam = new JSONObject();
                strParam.put( "path", new JSONString( parentPath ) );
                strParam.put( "fileName", new JSONString( fileName ) );

                ge.setStringParam( strParam.toString() );
              }

              EventBusUtil.EVENT_BUS.fireEvent( ge );

            } else {
              MessageDialogBox dialogBox =
                  new MessageDialogBox(
                      Messages.getString( "error" ), Messages.getString( "operationPermissionDenied" ), false, false, true ); //$NON-NLS-1$
              dialogBox.center();
            }
          }
        };
      }
      requestBuilder.setCallback( requestCallback );
View Full Code Here

    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 =
              new MessageDialogBox( Messages.getString( "error" ), exception.getLocalizedMessage(), false, false, true ); //$NON-NLS-1$
          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, true ); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
            dialogBox.center();
          }
        }
      } );
    } catch ( RequestException e ) {
      MessageDialogBox dialogBox =
          new MessageDialogBox( Messages.getString( "error" ), e.getLocalizedMessage(), false, false, true ); //$NON-NLS-1$
      dialogBox.center();
    }
  }
View Full Code Here

    metadataBuilder.setHeader( "accept", "application/json" );
    try {
      metadataBuilder.sendRequest( null, new RequestCallback() {

        public void onError( Request request, Throwable exception ) {
          MessageDialogBox dialogBox =
              new MessageDialogBox( Messages.getString( "error" ), exception.getLocalizedMessage(), false, false, true ); //$NON-NLS-1$
          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, true ); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
            dialogBox.center();
          }
        }
      } );
    } catch ( RequestException e ) {
      MessageDialogBox dialogBox =
          new MessageDialogBox( Messages.getString( "error" ), e.getLocalizedMessage(), false, false, true ); //$NON-NLS-1$
      dialogBox.center();
    }
  }
View Full Code Here

     * @param arg1
     */
    @Override
    public void onError( Request arg0, Throwable arg1 ) {
      WaitPopup.getInstance().setVisible( false );
      MessageDialogBox dialogBox =
          new MessageDialogBox( Messages.getString( "error" ), arg1.toString(), false, false, true ); //$NON-NLS-1$
      dialogBox.center();
    }
View Full Code Here

          //ignored
        }
        dirty = false;
      } else {
        WaitPopup.getInstance().setVisible( false );
        MessageDialogBox dialogBox =
            new MessageDialogBox(
                Messages.getString( "error" ), Messages.getString( "operationPermissionDenied" ), false, false, true ); //$NON-NLS-1$
        dialogBox.center();
      }
    }
View Full Code Here

      requestBuilder.setHeader( "If-Modified-Since", "01 Jan 1970 00:00:00 GMT" );
      requestBuilder.setHeader( "accept", "application/json" );
      requestBuilder.sendRequest( null, new RequestCallback() {

        public void onError( Request request, Throwable caught ) {
          MessageDialogBox dialogBox =
              new MessageDialogBox(
                  Messages.getString( "error" ), Messages.getString( "couldNotGetRoles" ), false, false, true ); //$NON-NLS-1$ //$NON-NLS-2$
          dialogBox.center();
        }

        public void onResponseReceived( Request request, Response response ) {
          JsArrayString roles = parseRolesJson( JsonUtils.escapeJsonForEval( response.getText() ) );
          // filter out existing
View Full Code Here

TOP

Related Classes of org.pentaho.gwt.widgets.client.dialogs.MessageDialogBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.