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

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


      @Override
      public boolean validate() {
        String name = scheduleNameTextBox.getText();
        boolean isValid = NameUtils.isValidFileName( name );
        if ( !isValid ) {
          MessageDialogBox errorDialog =
              new MessageDialogBox(
                  Messages.getString( "error" ), Messages.getString( "prohibitedNameSymbols", name, NameUtils.reservedCharListForDisplay( " " ) ), false, false, true ); //$NON-NLS-1$ //$NON-NLS-2$
          errorDialog.center();
        }
        return isValid;
      }
    } );
View Full Code Here


  public void bundleLoaded( String bundleName ) {
    AsyncCallback<Boolean> callback = new AsyncCallback<Boolean>() {

      public void onFailure( Throwable err ) {
        MessageDialogBox dialog =
            new MessageDialogBox( Messages.getString( "error" ), Messages.getString( "loginError" ), false, true, true ); //$NON-NLS-1$ //$NON-NLS-2$
        dialog.setCallback( new IDialogCallback() {
          public void cancelPressed() {
          }

          public void okPressed() {
            loginDialog.show();
          }
        } );
        dialog.center();
      }

      public void onSuccess( Boolean newWindow ) {
        if ( newWindow ) {
          String URL =
View Full Code Here

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

                public void onError( Request request, final Throwable caught ) {
                  MessageDialogBox errBox =
                      new MessageDialogBox(
                          Messages.getString( "loginError" ), Messages.getString( "authFailed" ), false, false, true ); //$NON-NLS-1$ //$NON-NLS-2$
                  errBox.setCallback( new IDialogCallback() {
                    public void cancelPressed() {
                    }

                    public void okPressed() {
                      outerCallback.onFailure( caught );
                    }
                  } );
                  errBox.show();
                }

                public void onResponseReceived( Request request, Response response ) {
                  if ( "true".equalsIgnoreCase( response.getText() ) ) {
                    long year = 1000 * 60 * 60 * 24 * 365;
                    // one year into the future
                    Date expirationDate = new Date( System.currentTimeMillis() + year );
                    Cookies.setCookie( "loginNewWindowChecked", "" + newWindowChk.getValue(), expirationDate ); //$NON-NLS-1$ //$NON-NLS-2$
                    outerCallback.onSuccess( newWindowChk != null && newWindowChk.getValue() );
                  } else {
                    outerCallback.onFailure( new Throwable( Messages.getString( "authFailed" ) ) ); //$NON-NLS-1$
                  }
                }

              } );
            } catch ( final RequestException e ) {
              MessageDialogBox errBox =
                  new MessageDialogBox(
                      Messages.getString( "loginError" ), Messages.getString( "authFailed" ), false, false, true ); //$NON-NLS-1$ //$NON-NLS-2$
              errBox.setCallback( new IDialogCallback() {
                public void cancelPressed() {
                }

                public void okPressed() {
                  outerCallback.onFailure( e );
                }
              } );
              errBox.show();
            }
          }
        };
        try {
          String username = userTextBox.getText();
View Full Code Here

    }
  }

  private void checkForError( String title, Response response ) {
    if ( response != null && response.getText() != null && response.getText().length() > 0 ) {
      MessageDialogBox messageBox = new MessageDialogBox( title, response.getText(), false, false, true
          , Messages.getString( "close" ) );
      messageBox.center();
    }
  }
View Full Code Here

      messageBox.center();
    }
  }

  private void displayErrorInMessageBox( String title, String message ) {
    MessageDialogBox messageBox = new MessageDialogBox( title, message, false, false, true
        , Messages.getString( "close" ) );
    messageBox.center();
  }
View Full Code Here

  }

  class DeleteRoleListener implements ClickHandler {
    public void onClick( ClickEvent event ) {
      if ( rolesListBox.getSelectedIndex() != -1 ) {
        MessageDialogBox warning = new MessageDialogBox( Messages.getString( "deleteRoleTitle" )
            , Messages.getString( "deleteRoleMessage" ), false, false, true, Messages.getString( "yesDelete" ), null
            , Messages.getString( "no" ) );
        warning.setCallback( new IDialogCallback() {
          @Override
          public void okPressed() {
            deleteRoles();
          }

          @Override
          public void cancelPressed() {
          }
        } );
        warning.center();
      }
    }
View Full Code Here

  }

  class DeleteUserListener implements ClickHandler {
    public void onClick( ClickEvent event ) {
      if ( usersListBox.getSelectedIndex() != -1 ) {
        MessageDialogBox warning = new MessageDialogBox( Messages.getString( "deleteUserTitle" )
            , Messages.getString( "deleteUserMessage" ), false, false, true, Messages.getString( "yesDelete" ), null
            , Messages.getString( "no" ) );
        warning.setCallback( new IDialogCallback() {
          @Override
          public void okPressed() {
            deleteUsers();
          }

          @Override
          public void cancelPressed() {
          }
        } );
        warning.center();
      }
    }
View Full Code Here

                      inheritsCheckBox.setValue( true );
                      refreshPermission();
                    } else {
                      inheritsCheckBox.setValue( false );
                      refreshPermission();
                      MessageDialogBox dialogBox =
                          new MessageDialogBox(
                              Messages.getString( "error" ), Messages.getString( "couldNotGetPermissions", response.getStatusText() ), //$NON-NLS-1$ //$NON-NLS-2$
                              false, false, true );
                      dialogBox.center();
                    }
                  }

                  @Override
                  public void onError( Request request, Throwable exception ) {
                    inheritsCheckBox.setValue( false );
                    refreshPermission();
                    MessageDialogBox dialogBox =
                        new MessageDialogBox(
                            Messages.getString( "error" ), Messages.getString( "couldNotGetPermissions", exception.getLocalizedMessage() ), //$NON-NLS-1$ //$NON-NLS-2$
                            false, false, true );
                    dialogBox.center();
                  }
                } );
              } catch ( RequestException e ) {
                inheritsCheckBox.setValue( false );
                refreshPermission();
                MessageDialogBox dialogBox =
                    new MessageDialogBox(
                        Messages.getString( "error" ), Messages.getString( "couldNotGetPermissions", e.getLocalizedMessage() ), //$NON-NLS-1$ //$NON-NLS-2$
                        false, false, true );
                dialogBox.center();
              }
            }
          };
          permissionsOverwriteConfirm.setCallback( callback );
          permissionsOverwriteConfirm.center();
View Full Code Here

    try {
      builder.sendRequest( null, 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;
          try {
View Full Code Here

    try {
      hasBlockoutsRequest.sendRequest( url, 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();
        }

        @Override
        public void onResponseReceived( Request request, Response response ) {
          Boolean hasBlockouts = Boolean.valueOf( response.getText() );
          if ( hasBlockouts ) {
            scheduleEditor.setBlockoutButtonHandler( new ClickHandler() {
              @Override
              public void onClick( final ClickEvent clickEvent ) {
                PromptDialogBox box =
                    new PromptDialogBox( Messages.getString( "blockoutTimes" ), Messages.getString( "close" ), null,
                        null, false, true, new BlockoutPanel( false ) );
                box.center();
              }
            } );
          }
          scheduleEditor.getBlockoutCheckButton().setVisible( hasBlockouts );
        }
      } );
    } catch ( RequestException e ) {
      MessageDialogBox dialogBox = new MessageDialogBox( Messages.getString( "error" ), e.toString(), //$NON-NLS-1$
          false, false, true );
      dialogBox.center();
    }
    IWizardPanel[] wizardPanels = { scheduleEditorWizardPanel };
    setWizardPanels( wizardPanels );
    setPixelSize( 475, 465 );
    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.