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

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


      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( "couldNotGetUsers" ), false, false, true ); //$NON-NLS-1$ //$NON-NLS-2$
          dialogBox.center();
        }

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


        contentTabPanel.showNewURLTab( Messages.getString( "editingColon" ) + file.getTitle(), Messages
          .getString( "editingColon" ) + file.getTitle(), editUrl, true ); //$NON-NLS-1$ //$NON-NLS-2$

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

        contentTabPanel
          .showNewURLTab(
            Messages.getString( "editingColon" ) + file.getTitle(), Messages.getString( "editingColon" ) + file.getTitle(), editUrl, true ); //$NON-NLS-1$ //$NON-NLS-2$

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

        url =
          "api/repo/files/" + SolutionBrowserPanel.pathToId( filesListPanel.getSelectedFileItems().get( 0 ).getRepositoryFile().getPath() ) + "/generatedContent"; //$NON-NLS-1$ //$NON-NLS-2$
        url = getPath() + url;

        if ( mode == FileCommand.COMMAND.BACKGROUND ) {
          MessageDialogBox dialogBox = new MessageDialogBox( Messages.getString( "info" ), //$NON-NLS-1$
            Messages.getString( "backgroundExecutionWarning" ), //$NON-NLS-1$
            true, false, true );
          dialogBox.center();

          url += "&background=true"; //$NON-NLS-1$

          RequestBuilder builder = new RequestBuilder( RequestBuilder.GET, url );
          try {
            builder.setHeader( "If-Modified-Since", "01 Jan 1970 00:00:00 GMT" );
            builder.sendRequest( null, new RequestCallback() {

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

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

      public void onChange( ChangeEvent event ) {
        if ( isPortValid( portTextBox.getValue() ) ) {
          emailConfig.setSmtpPort( Integer.parseInt( portTextBox.getValue() ) );
          setDirty( true );
        } else {
          new MessageDialogBox( Messages.getString( "error" ), Messages.getString( "portValidationLength" ), false
              , false, true ).center();
        }
      }
    } );

    prepareTextBox( fromAddressTextBox, new ChangeHandler() {
      @Override
      public void onChange( ChangeEvent event ) {
        emailConfig.setDefaultFrom( fromAddressTextBox.getValue() );
        setDirty( true );
      }
    } );

    prepareTextBox( fromNameTextBox, new ChangeHandler() {
      @Override
      public void onChange( ChangeEvent event ) {
        emailConfig.setFromName( fromNameTextBox.getValue() );
        setDirty( true );
      }
    } );

    prepareTextBox( userNameTextBox, new ChangeHandler() {
      @Override
      public void onChange( ChangeEvent event ) {
        emailConfig.setUserId( userNameTextBox.getValue() );
        setDirty( true );
      }
    } );

    useSSLCheckBox.addValueChangeHandler( new ValueChangeHandler<Boolean>() {
      public void onValueChange( final ValueChangeEvent<Boolean> booleanValueChangeEvent ) {
        emailConfig.setUseSsl( useSSLCheckBox.getValue() );
        setDirty( true );
      }
    } );

    useStartTLSCheckBox.addValueChangeHandler( new ValueChangeHandler<Boolean>() {
      public void onValueChange( final ValueChangeEvent<Boolean> booleanValueChangeEvent ) {
        emailConfig.setUseStartTls( useStartTLSCheckBox.getValue() );
        setDirty( true );
      }
    } );

    protocolsListBox.addChangeHandler( new ChangeHandler() {
      public void onChange( final ChangeEvent changeEvent ) {
        emailConfig.setSmtpProtocol( protocolsListBox.getItemText( protocolsListBox.getSelectedIndex() ) );
        setDirty( true );
      }
    } );

    saveButton.addClickHandler( new ClickHandler() {
      public void onClick( final ClickEvent clickEvent ) {
        if ( isPortValid( portTextBox.getValue() ) ) {
          setEmailConfig();
        } else {
          new MessageDialogBox( Messages.getString( "error" ), Messages.getString( "portValidationLength" ), false
              , false, true ).center();
        }
      }
    } );
View Full Code Here

    return "emailAdminPanel";
  }

  public void passivate( final AsyncCallback<Boolean> callback ) {
    if ( isDirty ) {
      MessageDialogBox messageBox = new MessageDialogBox( Messages.getString( "confirm" )
          , Messages.getString( "dirtyStateMessage" ), false, false, true, Messages.getString( "yes" ), null
          , Messages.getString( "no" ) );
      messageBox.setCallback( new IDialogCallback() {

        @Override
        public void okPressed() {
          if ( isPortValid( portTextBox.getValue() ) ) {
            setEmailConfig();
            callback.onSuccess( true );
            setDirty( false );
          } else {
            new MessageDialogBox( Messages.getString( "error" ), Messages.getString( "portValidationLength" ), false
                , false, true ).center();
          }
        }

        @Override
        public void cancelPressed() {
          callback.onSuccess( true );
          setDirty( false );
        }
      } );
      messageBox.center();
    } else {
      callback.onSuccess( true );
    }
  }
View Full Code Here

  private void getMantleSettings( final AsyncCallback<HashMap<String, String>> callback ) {
    final RequestCallback internalCallback = new RequestCallback() {

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

      public void onResponseReceived( Request request, Response response ) {

        JsArray<JsSetting> jsSettings = null;
View Full Code Here

  class AcceptListener implements ClickHandler {
    public void onClick( ClickEvent event ) {
      try {
        performSave();
      } catch ( RequestException e ) {
        MessageDialogBox dialogBox = new MessageDialogBox( Messages.getString( "error" ), e.toString(), //$NON-NLS-1$
            false, false, true );
        dialogBox.center();
      }
    }
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.