Package com.vaadin.terminal

Examples of com.vaadin.terminal.UserError


                    /*
                     * Sets the component error to the Conversion Exceptions
                     * message. This can be overriden in
                     * handleUnparsableDateString.
                     */
                    setComponentError(new UserError(e.getLocalizedMessage()));

                    /*
                     * The value of the DateField should be null if an invalid
                     * value has been given. Not using setValue() since we do
                     * not want to cause the client side value to change.
View Full Code Here


    setMainWindow(window);
    Panel panel = new Panel("nazwa panelu");
    panel.setSizeUndefined();
    LoginForm loginForm = new LoginForm();
    loginForm.setCaption("ralala");
    loginForm.setComponentError(new UserError("adasd"));
    panel.addComponent(loginForm);
    window.addComponent(panel);

    HorizontalLayout horizontalLayout = new HorizontalLayout();
    window.addComponent(horizontalLayout);
View Full Code Here

  private void addTestField(HorizontalSplitPanel verticalLayout) {
    final TextField textField = new TextField();
    textField.setImmediate(true);
    textField.setSizeFull();
    textField.setComponentError(new UserError("sdfds"));
    textField.setMaxLength(10);
    verticalLayout.addComponent(textField);
  }
View Full Code Here

    return layout;
  }

  @Override
  public void setErrorMessage(String msg) {
    layout.setComponentError(MString.isEmpty(msg) ? null : new UserError(msg));   
  }
View Full Code Here

    }
  }
 
  @Override
  public void setErrorMessage(String msg) {
    getLabel().setComponentError(msg == null ? null : new UserError(msg));
  }
View Full Code Here

                        if (login((String) m_name.getValue(), (String) m_password.getValue())) {
                            closeWindow();
                        }
                        else {
                            // TODO provide some feedback, login failed, for now don't close the login window
                            m_loginButton.setComponentError(new UserError("Invalid username or password."));
                        }
                    }
                });
            }
View Full Code Here

      private static final long serialVersionUID = 1L;

      public void buttonClick(ClickEvent event) {
       
        if (StringUtils.isEmpty((String) nameTextField.getValue())) {
          form.setComponentError(new UserError("The name field is required."));
          return;
        }
       
        Model newModelData = repositoryService.newModel();
       
View Full Code Here

      private static final long serialVersionUID = 1L;

      public void buttonClick(ClickEvent event) {
       
        if (StringUtils.isEmpty((String) nameTextField.getValue())) {
          form.setComponentError(new UserError("The name field is required."));
          return;
        }
       
        try {
          ObjectMapper objectMapper = new ObjectMapper();
View Full Code Here

      private static final long serialVersionUID = 1L;

      public void buttonClick(ClickEvent event) {
       
        if (StringUtils.isEmpty((String) nameTextField.getValue())) {
          form.setComponentError(new UserError("The name field is required."));
          return;
        }
       
        Model newModelData = repositoryService.newModel();
       
View Full Code Here

      private static final long serialVersionUID = 1L;

      public void buttonClick(ClickEvent event) {
       
        if (StringUtils.isEmpty((String) nameTextField.getValue())) {
          nameTextField.setComponentError(new UserError("The name field is required."));
          return;
        }
       
        if (selectEditorComponent.isModelerPreferred()) {
          try {
View Full Code Here

TOP

Related Classes of com.vaadin.terminal.UserError

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.