当前位置: 首页>>代码示例>>Java>>正文


Java PasswordTextField.setResetPassword方法代码示例

本文整理汇总了Java中org.apache.wicket.markup.html.form.PasswordTextField.setResetPassword方法的典型用法代码示例。如果您正苦于以下问题:Java PasswordTextField.setResetPassword方法的具体用法?Java PasswordTextField.setResetPassword怎么用?Java PasswordTextField.setResetPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.markup.html.form.PasswordTextField的用法示例。


在下文中一共展示了PasswordTextField.setResetPassword方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onInitialize

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
@Override
protected void onInitialize() {
	super.onInitialize();
	
	input = new PasswordTextField("input", Model.of(getModelObject()));
	input.setRequired(false);
	input.setResetPassword(false);
	add(input);

	String autocomplete = EditableUtils.getAutocomplete(getPropertyDescriptor().getPropertyGetter());
	if (autocomplete != null)
		input.add(AttributeAppender.append("autocomplete", autocomplete));
	
	add(new AttributeAppender("class", new LoadableDetachableModel<String>() {

		@Override
		protected String load() {
			if (hasErrors(true))
				return " has-error";
			else
				return "";
		}
		
	}));
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:26,代码来源:PasswordPropertyEditor.java

示例2: addSearchFields

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
private void addSearchFields(TitledBorder borderDn) {
    searchPattern = entity.getSearch();
    if (searchPattern == null) {
        searchPattern = new SearchPattern();
    }

    borderDn.add(new TextField<>("searchFilter", new PropertyModel<String>(searchPattern, "searchFilter")));
    borderDn.add(new SchemaHelpBubble("searchFilter.help", new SchemaHelpModel(searchPattern, "searchFilter")));

    borderDn.add(new TextField<>("searchBase", new PropertyModel<String>(searchPattern, "searchBase")));
    borderDn.add(new SchemaHelpBubble("searchBase.help", new SchemaHelpModel(searchPattern, "searchBase")));

    borderDn.add(new StyledCheckbox("searchSubTree", new PropertyModel<Boolean>(searchPattern, "searchSubTree")));
    borderDn.add(new SchemaHelpBubble("searchSubTree.help", new SchemaHelpModel(searchPattern, "searchSubTree")));

    borderDn.add(new TextField<>("managerDn", new PropertyModel<String>(searchPattern, "managerDn")));
    borderDn.add(new SchemaHelpBubble("managerDn.help", new SchemaHelpModel(searchPattern, "managerDn")));

    PasswordTextField managerPasswordField = new PasswordTextField(
            "managerPassword", new PropertyModel<String>(searchPattern, "managerPassword"));
    managerPasswordField.setRequired(false);
    managerPasswordField.setResetPassword(false);
    borderDn.add(managerPasswordField);
    borderDn.add(new SchemaHelpBubble("managerPassword.help",
            new SchemaHelpModel(searchPattern, "managerPassword")));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:27,代码来源:LdapCreateUpdatePanel.java

示例3: addTestConnectionFields

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
private void addTestConnectionFields() {
    TitledBorder borderTest = new TitledBorder("borderTest");
    form.add(borderTest);
    borderTest.add(new TextField<>("testUsername", new PropertyModel<String>(this, "testUsername")));
    borderTest.add(new HelpBubble("testUsername.help", "Username to test the LDAP connection"));

    PasswordTextField testPasswordField = new PasswordTextField(
            "testPassword", new PropertyModel<String>(this, "testPassword"));
    testPasswordField.setRequired(false);
    testPasswordField.setResetPassword(false);
    borderTest.add(testPasswordField);
    borderTest.add(new HelpBubble("testPassword.help", "Password to test the LDAP connection"));

    // Test connection button
    borderTest.add(createTestConnectionButton());
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:17,代码来源:LdapCreateUpdatePanel.java

示例4: onInitialize

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
@Override
protected void onInitialize() {
	super.onInitialize();
	
	input = new PasswordTextField("input", Model.of(getModelObject()));
	input.setResetPassword(true);
	input.setRequired(false);
	add(input);
	
	inputAgain = new PasswordTextField("inputAgain", Model.of(getModelObject()));
	inputAgain.setResetPassword(true);
	inputAgain.setRequired(false);
	add(inputAgain);
	
	String autocomplete = EditableUtils.getAutocomplete(getPropertyDescriptor().getPropertyGetter());
	if (autocomplete != null) {
		input.add(AttributeAppender.append("autocomplete", autocomplete));
		inputAgain.add(AttributeAppender.append("autocomplete", autocomplete));
	}
	
	add(new AttributeAppender("class", new LoadableDetachableModel<String>() {

		@Override
		protected String load() {
			if (hasErrors(true))
				return " has-error";
			else
				return "";
		}
		
	}));
	
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:34,代码来源:ConfirmativePasswordPropertyEditor.java

示例5: passwordField

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
private LabeledFormBorder<String> passwordField() {
	PasswordTextField passwordTextField = new PasswordTextField("password");
	//TODO its not recommended to disable the password reset. But without my tests are failing cause the password is not submitted. https://issues.apache.org/jira/browse/WICKET-6221 
	passwordTextField.setResetPassword(false);
	LabeledFormBorder<String> labeledPasswordTextField = new LabeledFormBorder<String>(getString("password"), passwordTextField){

		@Override
		public boolean isVisible() {
			return isCreatePage();
		}
		
	};
	return labeledPasswordTextField;
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:15,代码来源:CustomerCreatePage.java

示例6: initComponents

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
protected void initComponents() {
    add(new Label("host", getString("ActionContributor.Run.destination.host")));
    TextField<String> hostField = new TextField<String>("hostField",
            new PropertyModel<String>(destination, "host"));
    hostField.setLabel(new Model<String>(getString("ActionContributor.Run.destination.host")));
    hostField.setRequired(true);
    hostField.add(new JcrNameValidator());
    add(hostField);

    add(new Label("port", getString("ActionContributor.Run.destination.port")));
    TextField<Integer> portField = new TextField<Integer>("portField",
            new PropertyModel<Integer>(destination, "port"));
    add(portField);

    add(new Label("folder", getString("Folder")));
    TextField<String> folderField = new TextField<String>("folderField",
            new PropertyModel<String>(destination, "folder"));
    add(folderField);

    add(new Label("username", getString("ActionContributor.Run.destination.username")));
    TextField<String> userField = new TextField<String>("userField",
            new PropertyModel<String>(destination, "username"));
    add(userField);

    add(new Label("password", getString("ActionContributor.Run.destination.password")));
    PasswordTextField passwordField = new PasswordTextField("passwordField",
            new PropertyModel<String>(destination, "password"));
    passwordField.setRequired(false);
    passwordField.setResetPassword(false);
    add(passwordField);
    
    add(new Label("changedFileName", getString("ActionContributor.Run.destination.changedFileName")));
    TextField<String> fileNameField = new TextField<String>("changedFileNameField",
            new PropertyModel<String>(destination, "changedFileName"));
    fileNameField.setLabel(new Model<String>(getString("ActionContributor.Run.destination.changedFileName")));
    fileNameField.setRequired(false);
    fileNameField.add(new JcrNameValidator());
    add(fileNameField);       
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:40,代码来源:TransferPanel.java

示例7: addComponents

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
@Override
protected void addComponents(Form<Settings> form) {

	final TextField<String> mailServerIpField = new TextField<String>("mailServer.ip");
       form.add(mailServerIpField);
       final TextField<Integer> mailServerPortField = new TextField<Integer>("mailServer.port");
       form.add(mailServerPortField);
       final TextField<String> mailServerSenderField = new TextField<String>("mailServer.from");
       form.add(mailServerSenderField);
       final TextField<String> mailServerUsernameField = new TextField<String>("mailServer.username");
       form.add(mailServerUsernameField);
       final PasswordTextField mailServerPasswordField = new PasswordTextField("mailServer.password");
       mailServerPasswordField.setResetPassword(false);
       mailServerPasswordField.setRequired(false);
       form.add(mailServerPasswordField);
       final CheckBox tlsCheckField = new CheckBox("mailServer.enableTls");
       form.add(tlsCheckField);        
       form.add(new MailServerValidator(new FormComponent[] {mailServerIpField, mailServerPortField, mailServerSenderField}));
       
       final TextField<String> distributorDatePatternField = new TextField<String>("distributor.datePattern");
       distributorDatePatternField.add(new JcrNameValidator(getString("Settings.general.distributorDatePattern.error")));
       form.add(distributorDatePatternField);
       final TextField<String> distributorTimePatternField = new TextField<String>("distributor.timePattern");
       distributorTimePatternField.add(new JcrNameValidator(getString("Settings.general.distributorTimePattern.error")));
       form.add(distributorTimePatternField);
       
       Settings settings = storageService.getSettings();
       oldMailPort = settings.getMailServer().getPort();
       oldMailIp = settings.getMailServer().getIp();
       
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:32,代码来源:DistributionSettingsPanel.java

示例8: initLayout

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
private void initLayout(final boolean oldPasswordVisible) {
     model = (LoadableModel<MyPasswordsDto>) getModel();

     Label oldPasswordLabel = new Label(ID_OLD_PASSWORD_LABEL, createStringResource("PageSelfCredentials.oldPasswordLabel"));
     add(oldPasswordLabel);
     oldPasswordLabel.add(new VisibleEnableBehaviour() {
     	
     	private static final long serialVersionUID = 1L;

@Override
     	public boolean isVisible() {
     		return oldPasswordVisible;
     	}
     });

     Label passwordLabel = new Label(ID_PASSWORD_LABEL, createStringResource("PageSelfCredentials.passwordLabel1"));
     add(passwordLabel);

     PasswordTextField oldPasswordField =
             new PasswordTextField(ID_OLD_PASSWORD_FIELD, new PropertyModel<String>(model, MyPasswordsDto.F_OLD_PASSWORD));
     oldPasswordField.setRequired(false);
     oldPasswordField.setResetPassword(false);
     add(oldPasswordField);
     oldPasswordField.add(new VisibleEnableBehaviour() {
     	
     	private static final long serialVersionUID = 1L;
     	
     	public boolean isVisible() {
     		return oldPasswordVisible;
     	};
     });

     PasswordPanel passwordPanel = new PasswordPanel(ID_PASSWORD_PANEL, new PropertyModel<ProtectedStringType>(model, MyPasswordsDto.F_PASSWORD));
     passwordPanel.getBaseFormComponent().add(new AttributeModifier("autofocus", ""));
     add(passwordPanel);

     WebMarkupContainer accountContainer = new WebMarkupContainer(ID_ACCOUNTS_CONTAINER);

     List<IColumn<PasswordAccountDto, String>> columns = initColumns();
     ListDataProvider<PasswordAccountDto> provider = new ListDataProvider<PasswordAccountDto>(this,
             new PropertyModel<List<PasswordAccountDto>>(model, MyPasswordsDto.F_ACCOUNTS));
     TablePanel accounts = new TablePanel(ID_ACCOUNTS_TABLE, provider, columns);
     accounts.setItemsPerPage(30);
     accounts.setShowPaging(false);
     if (model.getObject().getPropagation() != null && model.getObject().getPropagation()
             .equals(CredentialsPropagationUserControlType.MAPPING)){
         accountContainer.setVisible(false);
     }
     accountContainer.add(accounts);

     AjaxLink help = new AjaxLink(ID_BUTTON_HELP) {
     	private static final long serialVersionUID = 1L;
     	
         @Override
         public void onClick(AjaxRequestTarget target) {
             showHelpPerformed(target);
         }
     };
     accountContainer.add(help);

     add(accountContainer);
 }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:63,代码来源:ChangePasswordPanel.java

示例9: addNetworkFields

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
private void addNetworkFields(CreateUpdateAction action, MutableCentralConfigDescriptor mutableDescriptor) {
    WebMarkupContainer networkBorder = new WebMarkupContainer("networkBorder");
    networkBorder.add(new TitledBorderBehavior("fieldset-border", "Network"));
    add(networkBorder);

    // proxy
    List<ProxyDescriptor> proxies = mutableDescriptor.getProxies();
    DropDownChoice<ProxyDescriptor> proxiesDropDown = new DropDownChoice<>("proxy", proxies,
            new ChoiceRenderer<ProxyDescriptor>("key", "key"));
    ProxyDescriptor defaultProxyDescriptor = mutableDescriptor.getDefaultProxy();
    if (defaultProxyDescriptor != null && CreateUpdateAction.CREATE.equals(action)) {
        proxiesDropDown.setDefaultModel(new Model<>(defaultProxyDescriptor));
    }
    proxiesDropDown.setNullValid(true);
    networkBorder.add(proxiesDropDown);
    networkBorder.add(new SchemaHelpBubble("proxy.help"));

    // localAddress
    TextField<String> localAddressField = new TextField<>("localAddress");
    localAddressField.add(new LocalAddressValidator());
    networkBorder.add(localAddressField);
    networkBorder.add(new SchemaHelpBubble("localAddress.help"));

    // socketTimeout
    networkBorder.add(new TextField<>("socketTimeoutMillis", Integer.class).setRequired(true));
    networkBorder.add(new SchemaHelpBubble("socketTimeoutMillis.help"));

    // allow passing authentication to redirected hosts
    networkBorder.add(new StyledCheckbox("allowAnyHostAuth"));
    networkBorder.add(new SchemaHelpBubble("allowAnyHostAuth.help"));

    // enable cookies
    networkBorder.add(new StyledCheckbox("enableCookieManagement"));
    networkBorder.add(new SchemaHelpBubble("enableCookieManagement.help"));

    // username
    networkBorder.add(new TextField("username"));
    networkBorder.add(new SchemaHelpBubble("username.help"));

    // password
    PasswordTextField passwordField = new PasswordTextField("password");
    passwordField.setRequired(false);
    passwordField.setResetPassword(false);
    networkBorder.add(passwordField);
    networkBorder.add(new SchemaHelpBubble("password.help"));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:47,代码来源:HttpRepoAdvancedPanel.java

示例10: ProxyCreateUpdatePanel

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
public ProxyCreateUpdatePanel(CreateUpdateAction action, ProxyDescriptor proxyDescriptor,
        ProxiesListPanel proxiesListPanel) {
    super(action, proxyDescriptor);
    this.proxiesListPanel = proxiesListPanel;
    setWidth(410);

    add(form);

    TitledBorder border = new TitledBorder("border");
    form.add(border);

    // Proxy key
    RequiredTextField<String> proxyKeyField = new RequiredTextField<>("key");
    setDefaultFocusField(proxyKeyField);
    proxyKeyField.setEnabled(isCreate());// don't allow key update
    if (isCreate()) {
        proxyKeyField.add(new NameValidator("Invalid proxy key '%s'."));
        proxyKeyField.add(new XsdNCNameValidator("Invalid proxy key '%s'."));
        proxyKeyField.add(new UniqueXmlIdValidator(proxiesListPanel.getEditingDescriptor()));
    }
    border.add(proxyKeyField);
    border.add(new SchemaHelpBubble("key.help"));

    border.add(new RequiredTextField("host"));
    border.add(new SchemaHelpBubble("host.help"));

    RequiredTextField<Integer> portField = new RequiredTextField<>("port");
    portField.add(new PortNumberValidator());
    border.add(portField);
    border.add(new SchemaHelpBubble("port.help"));

    border.add(new TextField("username"));
    border.add(new SchemaHelpBubble("username.help"));

    PasswordTextField passwordField = new PasswordTextField("password");
    passwordField.setRequired(false);
    passwordField.setResetPassword(false);
    border.add(passwordField);
    border.add(new SchemaHelpBubble("password.help"));

    border.add(new TextField("ntHost"));
    border.add(new SchemaHelpBubble("ntHost.help"));
    border.add(new TextField("domain"));
    border.add(new SchemaHelpBubble("domain.help"));

    //Global Proxy check box
    SystemDefaultCheckbox sysCheckbox = new SystemDefaultCheckbox(entity.isDefaultProxy());
    border.add(sysCheckbox);
    border.add(new SchemaHelpBubble("defaultProxy.help"));

    // Redirected hosts
    border.add(new TextArea("redirectedToHosts"));
    border.add(new SchemaHelpBubble("redirectedToHosts.help"));

    // Cancel button
    form.add(new ModalCloseLink("cancel"));
    // Submit button
    TitledAjaxSubmitLink submit = createSubmitButton(proxiesListPanel);
    form.add(submit);
    form.add(new DefaultButtonBehavior(submit));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:62,代码来源:ProxyCreateUpdatePanel.java

示例11: initLayout

import org.apache.wicket.markup.html.form.PasswordTextField; //导入方法依赖的package包/类
private void initLayout(final boolean oldPasswordVisible) {
     model = (LoadableModel<MyPasswordsDto>) getModel();

     Label oldPasswordLabel = new Label(ID_OLD_PASSWORD_LABEL, createStringResource("PageSelfCredentials.oldPasswordLabel"));
     add(oldPasswordLabel);
     oldPasswordLabel.add(new VisibleEnableBehaviour() {

     	private static final long serialVersionUID = 1L;

@Override
     	public boolean isVisible() {
     		return oldPasswordVisible;
     	}
     });

     Label passwordLabel = new Label(ID_PASSWORD_LABEL, createStringResource("PageSelfCredentials.passwordLabel1"));
     add(passwordLabel);

     PasswordTextField oldPasswordField =
             new PasswordTextField(ID_OLD_PASSWORD_FIELD, new PropertyModel<String>(model, MyPasswordsDto.F_OLD_PASSWORD));
     oldPasswordField.setRequired(false);
     oldPasswordField.setResetPassword(false);
     add(oldPasswordField);
     oldPasswordField.add(new VisibleEnableBehaviour() {

     	private static final long serialVersionUID = 1L;

     	public boolean isVisible() {
     		return oldPasswordVisible;
     	};
     });

     PasswordPanel passwordPanel = new PasswordPanel(ID_PASSWORD_PANEL, new PropertyModel<ProtectedStringType>(model, MyPasswordsDto.F_PASSWORD));
     passwordPanel.getBaseFormComponent().add(new AttributeModifier("autofocus", ""));
     add(passwordPanel);

     WebMarkupContainer accountContainer = new WebMarkupContainer(ID_ACCOUNTS_CONTAINER);

     List<IColumn<PasswordAccountDto, String>> columns = initColumns();
     ListDataProvider<PasswordAccountDto> provider = new ListDataProvider<PasswordAccountDto>(this,
             new PropertyModel<List<PasswordAccountDto>>(model, MyPasswordsDto.F_ACCOUNTS));
     TablePanel accounts = new TablePanel(ID_ACCOUNTS_TABLE, provider, columns);
     accounts.setItemsPerPage(30);
     accounts.setShowPaging(false);
     if (model.getObject().getPropagation() != null && model.getObject().getPropagation()
             .equals(CredentialsPropagationUserControlType.MAPPING)){
         accountContainer.setVisible(false);
     }
     accountContainer.add(accounts);

     AjaxLink help = new AjaxLink(ID_BUTTON_HELP) {
     	private static final long serialVersionUID = 1L;

         @Override
         public void onClick(AjaxRequestTarget target) {
             showHelpPerformed(target);
         }
     };
     accountContainer.add(help);

     add(accountContainer);
 }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:63,代码来源:ChangePasswordPanel.java


注:本文中的org.apache.wicket.markup.html.form.PasswordTextField.setResetPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。