Package com.vaadin.ui

Examples of com.vaadin.ui.PasswordField


                setSpacing(true);
                setMargin(true);
                setClosable(false);
                setSizeFull();
                m_name = new TextField("Name", "");
                m_password = new PasswordField("Password", "");
                m_loginButton = new Button("Login");
                addComponent(m_name);
                addComponent(m_password);
                addComponent(m_loginButton);
                setComponentAlignment(m_loginButton, Alignment.BOTTOM_CENTER);
View Full Code Here


    layout.addComponent(inputGrid);
    layout.setComponentAlignment(inputGrid, Alignment.MIDDLE_CENTER);
   
    Label newPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_NEW_PASSWORD));
    inputGrid.addComponent(newPasswordLabel);
    passwordField1 = new PasswordField();
    passwordField1.setWidth(150, UNITS_PIXELS);
    inputGrid.addComponent(passwordField1);
    passwordField1.focus();

    Label confirmPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_CONFIRM_PASSWORD));
    inputGrid.addComponent(confirmPasswordLabel);
    passwordField2 = new PasswordField();
    passwordField2.setWidth(150, UNITS_PIXELS);
    inputGrid.addComponent(passwordField2);
  }
View Full Code Here

    });
   
    final TextField imapUserName = new TextField(i18nManager.getMessage(Messages.IMAP_USERNAME));
    imapForm.getLayout().addComponent(imapUserName);
   
    final PasswordField imapPassword = new PasswordField(i18nManager.getMessage(Messages.IMAP_PASSWORD));
    imapForm.getLayout().addComponent(imapPassword);
   
    // Matching listener
    imapClickListener = new ClickListener() {
      public void buttonClick(ClickEvent event) {
        Map<String, Object> accountDetails = createAccountDetails(
                "imap",
                imapUserName.getValue().toString(),
                imapPassword.getValue().toString(),
                "server", imapServer.getValue().toString(),
                "port", imapPort.getValue().toString(),
                "ssl", imapPort.getValue().toString()
                );
        fireEvent(new SubmitEvent(AccountSelectionPopup.this, SubmitEvent.SUBMITTED, accountDetails));
View Full Code Here

    alfrescoForm.getLayout().addComponent(alfrescoServer);
   
    final TextField alfrescoUserName = new TextField(i18nManager.getMessage(Messages.ALFRESCO_USERNAME));
    alfrescoForm.getLayout().addComponent(alfrescoUserName);
   
    final PasswordField alfrescoPassword = new PasswordField(i18nManager.getMessage(Messages.ALFRESCO_PASSWORD));
    alfrescoForm.getLayout().addComponent(alfrescoPassword);
   
    // Matching listener
    alfrescoClickListener = new ClickListener() {
      public void buttonClick(ClickEvent event) {
        Map<String, Object> accountDetails = createAccountDetails(
                "alfresco",
                alfrescoUserName.getValue().toString(),
                alfrescoPassword.getValue().toString(),
                "server", alfrescoServer.getValue().toString()
                );
        fireEvent(new SubmitEvent(AccountSelectionPopup.this, SubmitEvent.SUBMITTED, accountDetails));
      }
    };
View Full Code Here

    setCaption("Login");

    final TextField username = new TextField("Username");
    addComponent(username);

    final PasswordField password = new PasswordField("Password");
    addComponent(password);

    final CheckBox rememberMe = new CheckBox("Remember Me");
    addComponent(rememberMe);

    username.focus();
   
    // TODO: Remove these two lines before production release
    username.setValue("admin");
    password.setValue("admin");
   
    if (ApplicationSecurity.isRemembered())
    {
      username.setValue(ApplicationSecurity.whoIsRemembered());
      rememberMe.setValue(ApplicationSecurity.isRemembered());
      password.focus();
    }

    @SuppressWarnings("serial")
    final Button login = new Button("Login", new Button.ClickListener()
    {
      public void buttonClick(ClickEvent event)
      {
        final Navigator navigator = UI.getCurrent().getNavigator();
        if (ApplicationSecurity.login(username.getValue(), password.getValue(), rememberMe.getValue()))
        {
          final String location = (fragmentAndParameters == null)
              ? ApplicationView.NAME
              : fragmentAndParameters;
         
View Full Code Here

    layout.addComponent(inputGrid);
    layout.setComponentAlignment(inputGrid, Alignment.MIDDLE_CENTER);
   
    Label newPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_NEW_PASSWORD));
    inputGrid.addComponent(newPasswordLabel);
    passwordField1 = new PasswordField();
    passwordField1.setWidth(150, UNITS_PIXELS);
    inputGrid.addComponent(passwordField1);
    passwordField1.focus();

    Label confirmPasswordLabel = new Label(i18nManager.getMessage(Messages.PROFILE_CONFIRM_PASSWORD));
    inputGrid.addComponent(confirmPasswordLabel);
    passwordField2 = new PasswordField();
    passwordField2.setWidth(150, UNITS_PIXELS);
    inputGrid.addComponent(passwordField2);
  }
View Full Code Here

        return false;
      }
    });
   
    // Password is required
    form.addField("password", new PasswordField(i18nManager.getMessage(Messages.USER_PASSWORD)));
    form.getField("password").setRequired(true);
    form.getField("password").setRequiredError(i18nManager.getMessage(Messages.USER_PASSWORD_REQUIRED));
   
    // Password must be at least 5 characters
    StringLengthValidator passwordLengthValidator = new StringLengthValidator(i18nManager.getMessage(Messages.USER_PASSWORD_MIN_LENGTH, 5), 5, -1, false);
View Full Code Here

      addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_LASTNAME), lastNameField);
     
      emailField = new TextField(null, user.getEmail() != null ? user.getEmail() : "");
      addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_EMAIL), emailField);
     
      passwordField = new PasswordField();
      Label cautionLabel = new Label(i18nManager.getMessage(Messages.USER_RESET_PASSWORD));
      cautionLabel.addStyleName(Reindeer.LABEL_SMALL);
      HorizontalLayout passwordLayout = new HorizontalLayout();
      passwordLayout.setSpacing(true);
      passwordLayout.addComponent(passwordField);
View Full Code Here

        return false;
      }
    });
   
    // Password is required
    form.addField("password", new PasswordField(i18nManager.getMessage(Messages.USER_PASSWORD)));
    form.getField("password").setRequired(true);
    form.getField("password").setRequiredError(i18nManager.getMessage(Messages.USER_PASSWORD_REQUIRED));
   
    // Password must be at least 5 characters
    StringLengthValidator passwordLengthValidator = new StringLengthValidator(i18nManager.getMessage(Messages.USER_PASSWORD_MIN_LENGTH, 5), 5, -1, false);
View Full Code Here

      addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_LASTNAME), lastNameField);
     
      emailField = new TextField(null, user.getEmail() != null ? user.getEmail() : "");
      addUserDetail(detailGrid, i18nManager.getMessage(Messages.USER_EMAIL), emailField);
     
      passwordField = new PasswordField();
      Label cautionLabel = new Label(i18nManager.getMessage(Messages.USER_RESET_PASSWORD));
      cautionLabel.addStyleName(Reindeer.LABEL_SMALL);
      HorizontalLayout passwordLayout = new HorizontalLayout();
      passwordLayout.setSpacing(true);
      passwordLayout.addComponent(passwordField);
View Full Code Here

TOP

Related Classes of com.vaadin.ui.PasswordField

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.