Examples of PasswordItem


Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

    userNameItem.setTitle(i18n.loginUserName());
    userNameItem.setSelectOnFocus(true);
    userNameItem.setWrapTitle(false);

    // Password:
    PasswordItem passwordItem = new PasswordItem(FIELD_PASSWORD);
    passwordItem.setWidth(logoWidth - 60);
    passwordItem.setTitle(i18n.loginPassword());
    passwordItem.setWrapTitle(false);

    // Login form:
    loginForm = new DynamicForm();
    loginForm.setAutoFocus(true);
    loginForm.setNumCols(2);
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

            TextItem user = new TextItem("user", MSG.common_title_user());
            user.setRequired(true);
            user.setAttribute("autoComplete", "native");

            final PasswordItem password = new PasswordItem("password", MSG.common_title_password());
            password.setRequired(true);
            password.setAttribute("autoComplete", "native");

            loginButton = new SubmitItem("login", MSG.view_login_login());
            loginButton.setAlign(Alignment.CENTER);
            loginButton.setColSpan(2);

            user.addKeyPressHandler(new KeyPressHandler() {
                public void onKeyPress(KeyPressEvent event) {
                    if ((event.getCharacterValue() != null)
                        && (((event.getCharacterValue() == KeyCodes.KEY_ENTER)) || (event.getCharacterValue() == KeyCodes.KEY_TAB))) {
                        password.focusInItem(); // Work around the form not getting auto-fill values until the field is focused
                    }
                }
            });

            password.addKeyPressHandler(new KeyPressHandler() {
                public void onKeyPress(KeyPressEvent event) {
                    if ((event.getCharacterValue() != null) && (event.getCharacterValue() == KeyCodes.KEY_ENTER)) {
                        form.submit();
                    }
                }
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

    private DynamicForm createAnotherUserForm() {
        DynamicForm form = new DynamicForm();
        form.setTitleOrientation(TitleOrientation.TOP);
        anotherUserName = new TextItem("userName", MSG.common_title_username());
        anotherUserPassword = new PasswordItem("password", MSG.common_title_password());
        anotherUserPassword.setAttribute("autocomplete", "off");
        verifyUserButton = new ButtonItem("verify",
            MSG.view_alert_definition_notification_cliScript_editor_verifyAuthentication());

        successIcon = new FormItemIcon();
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

                    break;
                case LONG_STRING:
                    valueItem = new TextAreaItem();
                    break;
                case PASSWORD:
                    valueItem = new PasswordItem();
                    valueItem.setAttribute("autocomplete", "off");
                    break;
                case BOOLEAN:
                    RadioGroupItem radioGroupItem = new RadioGroupItem();
                    radioGroupItem.setVertical(false);
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

        username.setWidth(textFieldWidth);
        username.setPrompt(MSG.view_remoteAgentInstall_promptUser());
        username.setHoverWidth(300);
        username.setEndRow(true);

        PasswordItem password = new PasswordItem("password", MSG.common_title_password());
        password.setRequired(false); // if not specified, the server will attempt to use the default ssh pw defined in system settings
        password.setWidth(textFieldWidth);
        password.setPrompt(MSG.view_remoteAgentInstall_promptPassword());
        password.setHoverWidth(300);
        password.setEndRow(true);
        password.setAttribute("autocomplete", "off");

        rememberMeCheckbox = new CheckboxItem("rememberme", MSG.view_remoteAgentInstall_rememberMe());
        rememberMeCheckbox.setRequired(false);
        rememberMeCheckbox.setPrompt(MSG.view_remoteAgentInstall_promptRememberMe());
        rememberMeCheckbox.setHoverWidth(300);
        rememberMeCheckbox.setColSpan(2);
        rememberMeCheckbox.setEndRow(true);

        agentInstallPath = new TextItem("agentInstallPath", MSG.view_remoteAgentInstall_installPath());
        agentInstallPath.setWidth(textFieldWidth);
        agentInstallPath.setPrompt(MSG.view_remoteAgentInstall_promptInstallPath());
        agentInstallPath.setHoverWidth(300);
        agentInstallPath.setStartRow(true);
        agentInstallPath.setEndRow(false);
        agentInstallPath.setValidators(absPathValidator); // we will "turn this on" when needed - this is to ensure we create paths properly and it doesn't go in places user isn't expecting

        findAgentInstallPathButton = new ButtonItem("findAgentInstallPathButton",
            MSG.view_remoteAgentInstall_buttonFindAgent());
        findAgentInstallPathButton.setStartRow(false);
        findAgentInstallPathButton.setEndRow(true);
        if (findAgentInstallPathButton.getTitle().length() < 15) { //i18n may prolong the title
            findAgentInstallPathButton.setWidth(100);
        }
        findAgentInstallPathButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
            public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent clickEvent) {
                // we only want to validate host
                if (connectionForm.getValueAsString("host") == null
                    || connectionForm.getValueAsString("host").trim().isEmpty()) {
                    final HashMap<String, String> errors = new HashMap<String, String>(1);
                    errors.put("host", CoreGUI.getSmartGwtMessages().validator_requiredField());
                    connectionForm.setErrors(errors, true);
                    return;
                }

                new CheckSSHConnectionCallback() {
                    @Override
                    protected void doActualWork() {
                        findAgentInstallPath();
                    }
                }.execute();
            }
        });

        createAgentStatusTextItem();

        statusCheckButton = new ButtonItem("updateStatus", MSG.common_title_updateStatus());
        statusCheckButton.setStartRow(false);
        statusCheckButton.setEndRow(true);
        if (findAgentInstallPathButton.getTitle().length() < 15) { //i18n may prolong the title
            statusCheckButton.setWidth(100);
        }
        statusCheckButton.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
            public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent clickEvent) {
                if (connectionForm.validate()) {
                    new CheckSSHConnectionCallback() {
                        @Override
                        protected void doActualWork() {
                            agentStatusCheck();
                        }
                    }.execute();
                }
            }
        });

        if (initialAgentInstall != null) {
            host.setValue(initialAgentInstall.getSshHost());
            if (initialAgentInstall.getSshPort() != null) {
                port.setValue(String.valueOf(initialAgentInstall.getSshPort()));
            }
            username.setValue(initialAgentInstall.getSshUsername());
            password.setValue(initialAgentInstall.getSshPassword());
            agentInstallPath.setValue(initialAgentInstall.getInstallLocation());
            // if it was already saved, assume they want it to stay remembered
            // however, because the uninstall page is getting rid of the agent, we don't need or want to remember the credentials anymore
            if (!this.showUninstallButton) {
                rememberMeCheckbox.setValue(initialAgentInstall.getSshPassword() != null);
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

        items.add(isLdapItem);
        boolean isLdapAuthenticatedUser = Boolean.valueOf(form.getValueAsString(UsersDataSource.Field.LDAP));

        // Only display the password fields for non-LDAP users (i.e. users that have an associated RHQ Principal).
        if (!this.isReadOnly() && !isLdapAuthenticatedUser) {
            PasswordItem passwordItem = new PasswordItem(UsersDataSource.Field.PASSWORD);
            passwordItem.setShowTitle(true);
            items.add(passwordItem);

            final PasswordItem verifyPasswordItem = new PasswordItem(UsersDataSource.Field.PASSWORD_VERIFY);
            verifyPasswordItem.setShowTitle(true);
            final boolean[] initialPasswordChange = { true };
            passwordItem.addChangedHandler(new ChangedHandler() {
                public void onChanged(ChangedEvent event) {
                    if (initialPasswordChange[0]) {
                        verifyPasswordItem.clearValue();
                        initialPasswordChange[0] = false;
                    }
                }
            });
            items.add(verifyPasswordItem);
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

        urlUserNameItem.setRequired(false);
        urlUserNameItem.setShowTitle(true);
        urlUserNameItem.setWidth(100);
        urlUserNameItem.setColSpan(1);
        urlUserNameItem.setAlign(Alignment.LEFT);
        urlPasswordItem = new PasswordItem("password", URL_OPTION_PASSWORD);
        urlPasswordItem.setAttribute("autocomplete", "off");
        urlPasswordItem.setTooltip(URL_OPTION_TOOLTIP);
        urlPasswordItem.setRequired(false);
        urlPasswordItem.setShowTitle(true);
        urlPasswordItem.setWidth(100);
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

                break;
            case LONG_STRING:
                editorItem = new TextAreaItem();
                break;
            case PASSWORD:
                editorItem = new PasswordItem();
                editorItem.setAttribute("autocomplete", "off");
                break;
            case BOOLEAN:
                // TODO: we want RadioGroupItem, but smartgwt seems to have a bug and it won't render this when
                //       our listgrid does not have the "unset" boolean field also present. If its just the value
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

    TextItem username = new TextItem()
    username.setTitle("Username");
    username.setName("username");
    username.setSelectOnFocus(true);
    //username.focusInItem();
    PasswordItem pass = new PasswordItem();
    pass.setTitle("Password");
    pass.setName("pass");
    form = new DynamicForm();
    form.setFields(username,pass);
    form.setAutoFocus(true)
   
    fillTextsWithCookie(username,pass);
    final CheckboxItem ch_remember = new CheckboxItem()
    ch_remember.setTitle("Remember me");
    ch_remember.setValue(true);
    DynamicForm remember_form = new DynamicForm();
    remember_form.setFields(ch_remember);
   
   
    final HTMLFlow message  = new HTMLFlow();
    //message.setVisible(true);
   
    IButton loginButton = new IButton("Login")
    //loginButton.setSelected(true);
    //loginButton.setLeft(300); 
    loginButton.addClickHandler(new ClickHandler() { 
      public void onClick(ClickEvent event) { 
        final String username = getFieldValue("username").toLowerCase();
        final String pass = getFieldValue("pass");
        if(isAnyEmptyField(username,pass))
          message.setContents("Please do not leave any field empty!");
        else
          systemcall.login(username,pass, new AsyncCallback<Boolean>(){
          public void onSuccess(Boolean success)
          {
            if(!success)
            {
              message.setContents("Failed to login!");
            }else
            {
              if(ch_remember.getValueAsBoolean())
                setLastLoginName(username, pass);
              else{
                if(username.equals(getLastUserName()) && pass.equals(getLastPassword())){
                  removeLastLoginName();
                }
              }
              window.destroy();
            }
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.PasswordItem

        usernameItem.setColSpan(1);
        usernameItem.setStartRow(false);
        usernameItem.setEndRow(true);

        //item with the password of the user
        PasswordItem passwordItem = new PasswordItem("fPassword");
        passwordItem.setTitle(constants.password());
        passwordItem.setRequired(true);
        passwordItem.setWrapTitle(false);
        passwordItem.setColSpan(1);
        passwordItem.setStartRow(false);
        passwordItem.setEndRow(true);

        passwordItem.addKeyPressHandler(new KeyPressHandler(){
            @Override
            public void onKeyPress(KeyPressEvent event) {
                if(event.getKeyName().equals("Enter")){
                    clicked(form);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.