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


Java RequiredTextField.add方法代码示例

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


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

示例1: GeneralSettingsPanel

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
public GeneralSettingsPanel(String id) {
    super(id);
    add(new CssClass("general-settings-panel"));

    add(new TextField("serverName"));

    WebApplicationAddon applicationAddon = addonsManager.addonByType(WebApplicationAddon.class);

    add(applicationAddon.getUrlBaseLabel("urlBaseLabel"));
    add(applicationAddon.getUrlBaseTextField("urlBase"));
    RequiredTextField<Integer> uploadSizeField = new RequiredTextField<>("fileUploadMaxSizeMb");
    uploadSizeField.add(new RangeValidator<>(0, Integer.MAX_VALUE));
    add(uploadSizeField);
    RequiredTextField<String> dateFormatField = new RequiredTextField<>("dateFormat");
    dateFormatField.add(new DateFormatValidator());
    add(dateFormatField);
    add(new StyledCheckbox("offlineMode"));
    add(new SchemaHelpBubble("serverName.help"));
    add(applicationAddon.getUrlBaseHelpBubble("urlBase.help"));
    add(new SchemaHelpBubble("fileUploadMaxSizeMb.help"));
    add(new SchemaHelpBubble("dateFormat.help"));
    add(new SchemaHelpBubble("offlineMode.help"));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:24,代码来源:GeneralSettingsPanel.java

示例2: initComponents

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalOnlineStorageServicePanelIcon",new ResourceModel("onlineStorage-icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
        RequiredTextField<String> label = new RequiredTextField<String>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.storage.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        TextField<String> serviceName = new TextField<String>("serviceName");
        serviceName.setLabel(new StringResourceModel("portal.designer.service.storage.name", null));
        serviceName.add(new PropertyValidator<>());
        getServiceForm().add(serviceName);

        TextField storageCapacityMb = new TextField("storageCapacityMb");
        storageCapacityMb.setLabel(new StringResourceModel("portal.designer.service.storage.storageCapacityMb",null));
        storageCapacityMb.add(new AttributeModifier("class","small"));
        storageCapacityMb.add(new PropertyValidator<>());
        getServiceForm().add(storageCapacityMb);

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:36,代码来源:LogicalOnlineStorageServicePanel.java

示例3: initComponents

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
private void initComponents() {
	 getServiceForm().add(new CacheActivatedImage("logicalRelationnalDatabasePanelIcon",new ResourceModel("onlinedatabase.icon").getObject()));
	// Online help link
	String completeHelpUrl = "";
	try {
		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
    			+ new StringResourceModel("portal.designer.logical.service.online_manual.relationaldatabase", null).getString();
	} catch (Exception e) {
		//do nothing
	}
	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
	getServiceForm().add(onlineHelpLink);
	if (completeHelpUrl.isEmpty()) {
		onlineHelpLink.setVisible(false);
	}
	
    // FUNCTIONNAL PARAMETERS
    final RequiredTextField<String> label = new RequiredTextField<String>("label");
    label.setLabel(new StringResourceModel("portal.designer.service.reldb.label",null));
    label.add(new PropertyValidator<>());
    getServiceForm().add(label);

    TextField<String> serviceName = new TextField<String>("serviceName");
    serviceName.setLabel(new StringResourceModel("portal.designer.service.reldb.serviceName",null));
    serviceName.add(new PropertyValidator<>());
    getServiceForm().add(serviceName);

    DropDownChoice<LogicalRelationalServiceSqlDialectEnum> sqlVersion = new DropDownChoice<LogicalRelationalServiceSqlDialectEnum>("sqlVersion", Arrays.asList(LogicalRelationalServiceSqlDialectEnum.values()));
    sqlVersion.setLabel(new StringResourceModel("portal.designer.service.reldb.sqlVersion",null));
    sqlVersion.add(new PropertyValidator<>());
    getServiceForm().add(sqlVersion);


    // SLO
    TextField capacityMo = new TextField("capacityMo");
    capacityMo.setLabel(new StringResourceModel("portal.designer.service.reldb.capacityMo",null));
    capacityMo.add(new AttributeModifier("class","small"));
    capacityMo.add(new PropertyValidator<>());
    getServiceForm().add(capacityMo);
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:41,代码来源:LogicalRelationalDatabasePanel.java

示例4: initComponents

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalRabbitMQPanelIcon",new ResourceModel("rabbitmq.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
    	RequiredTextField<String> serviceLabel = new RequiredTextField<String>("label");
        serviceLabel.setLabel(new StringResourceModel("portal.designer.service.rabbitmq.service.label",null));
        serviceLabel.add(new PropertyValidator<>());
        getServiceForm().add(serviceLabel);

        // Cloudfoundry rabbitMQ service name
        RequiredTextField<String> serviceName = new RequiredTextField<String>("serviceName");
         //add help tooltip
        serviceName.add(new AttributeModifier("title", new StringResourceModel("portal.designer.service.rabbitmq.service.name.help",null)));
        serviceName.setLabel(new StringResourceModel("portal.designer.service.rabbitmq.service.name",null));
        serviceName.add(new PropertyValidator<>());
        getServiceForm().add(serviceName);
       
     

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:35,代码来源:LogicalRabbitMQServicePanel.java

示例5: GroupCreateUpdatePanel

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
public GroupCreateUpdatePanel(CreateUpdateAction action, GroupInfo groupInfo,
        GroupsListPanel groupsListPanel) {
    super(action, groupInfo);
    setWidth(440);

    add(form);

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

    // Group name
    RequiredTextField<String> groupNameTf = new RequiredTextField<>("groupName");
    setDefaultFocusField(groupNameTf);
    groupNameTf.add(StringValidator.maximumLength(100));
    groupNameTf.setEnabled(isCreate());// don't allow groupname update
    groupNameTf.add(new NameValidator("Invalid group name '%s'"));
    border.add(groupNameTf);

    // Group description
    TextArea groupDescriptionTextArea = new TextArea("description");
    border.add(groupDescriptionTextArea);

    // If default for newly created users
    border.add(new StyledCheckbox("newUserDefault"));

    // Cancel button
    form.add(new ModalCloseLink("cancel"));

    // Submit button
    TitledAjaxSubmitLink submit = createSubmitButton(groupsListPanel);
    form.add(submit);
    form.add(new DefaultButtonBehavior(submit));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:35,代码来源:GroupCreateUpdatePanel.java

示例6: AddEditCredentialGroupPanel

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
public AddEditCredentialGroupPanel(String id, CredentialGroup credentialGroup) {
    super(id, true);
    this.credentialGroupModel = new EntityModel<CredentialGroup>(credentialGroup);
    this.isCreation = credentialGroup.getId() == null;

    Form form = getForm();
    form.setModel(new CompoundPropertyModel(credentialGroupModel));
    form.add(new SetFocusBehavior(form));

    nameField = new RequiredTextField("name");
    nameField.add(new StringValidator.MaximumLengthValidator(255));

    connectorInstancesCheckGroup = new CheckGroup("connectorInstances", new PropertyModel(
        credentialGroupModel, "connectorInstances"));

    IModel connectorInstancesModel = new LoadableDetachableModel() {
        @Override
        protected Object load() {
            AdminCollectionPanel adminCollectionPanel = (AdminCollectionPanel) findParent(AdminCollectionPanel.class);
            RecordCollection collection = adminCollectionPanel.getCollection();
            return new ArrayList<ConnectorInstance>(collection.getConnectorInstances());
        }
    };
    connectorInstancesListView = new ListView("connectorInstancesListView", connectorInstancesModel) {
        @Override
        protected void populateItem(ListItem item) {
            ConnectorInstance connectorInstance = (ConnectorInstance) item.getModelObject();
            Check check = new Check("check", new ReloadableEntityModel<ConnectorInstance>(
                connectorInstance));
            Label label = new Label("label", connectorInstance.getDisplayName());
            item.add(check);
            item.add(label);
        }
    };
    connectorInstancesListView.setReuseItems(true);

    form.add(nameField);
    form.add(connectorInstancesCheckGroup);
    connectorInstancesCheckGroup.add(connectorInstancesListView);
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:41,代码来源:AddEditCredentialGroupPanel.java

示例7: ScheduleNameStep

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
public ScheduleNameStep() {
    super();
    RequiredTextField<String> textField = new RequiredTextField<String>("schedulerJob.name");
    textField.setLabel(new Model<String>(getString("name")));
    textField.add(new JcrNameValidator());
    add(textField);
    add(new DuplicationEntityValidator(textField, StorageConstants.SCHEDULER_ROOT));
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:9,代码来源:ScheduleWizard.java

示例8: initStaticLayout

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
private void initStaticLayout(Form<?> mainForm) {
	WebMarkupContainer staticLayout = new WebMarkupContainer(ID_STATIC_LAYOUT);
	staticLayout.setOutputMarkupId(true);
	mainForm.add(staticLayout);

	staticLayout.add(new VisibleEnableBehaviour() {

		private static final long serialVersionUID = 1L;

		@Override
		public boolean isVisible() {
			return !isDynamicForm();
		}
	});

	WebMarkupContainer userNameContainer = new WebMarkupContainer(ID_USERNAME_CONTAINER);
	userNameContainer.setOutputMarkupId(true);
	staticLayout.add(userNameContainer);

	RequiredTextField<String> userName = new RequiredTextField<String>(ID_USERNAME, new Model<String>());
	userName.setOutputMarkupId(true);
	userNameContainer.add(userName);
	userNameContainer.add(new VisibleEnableBehaviour() {

		private static final long serialVersionUID = 1L;

		public boolean isVisible() {
			return getResetPasswordPolicy().getResetMethod() == ResetMethod.SECURITY_QUESTIONS;
		};
	});

	WebMarkupContainer emailContainer = new WebMarkupContainer(ID_EMAIL_CONTAINER);
	emailContainer.setOutputMarkupId(true);
	staticLayout.add(emailContainer);
	RequiredTextField<String> email = new RequiredTextField<String>(ID_EMAIL, new Model<String>());
	email.add(RfcCompliantEmailAddressValidator.getInstance());
	email.setOutputMarkupId(true);
	emailContainer.add(email);
	emailContainer.add(new VisibleEnableBehaviour() {

		private static final long serialVersionUID = 1L;

		public boolean isVisible() {
			ResetMethod resetMethod = getResetPasswordPolicy().getResetMethod();
			return resetMethod == ResetMethod.SECURITY_QUESTIONS || resetMethod == ResetMethod.MAIL;
		};
	});

}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:50,代码来源:PageForgotPassword.java

示例9: initComponent

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
private void initComponent() {

    	getServiceForm().add(new CacheActivatedImage("logicalSoapConsummerPanelIcon",new ResourceModel("webserviceconsumer.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
        RequiredTextField<String> label = new RequiredTextField<String>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        TextField<String> jndiPrefix = new TextField<String>("jndiPrefix");
        jndiPrefix.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.jndiPrefix",null));
        jndiPrefix.add(new PropertyValidator<>());
        getServiceForm().add(jndiPrefix);

        DropDownChoice<LogicalSoapConsumer.SoapServiceDomainEnum> domain = new DropDownChoice<LogicalSoapConsumer.SoapServiceDomainEnum>("wsDomain", Arrays.asList(LogicalSoapConsumer.SoapServiceDomainEnum.values()));
        domain.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.wsdomain",null));
        domain.add(new PropertyValidator<>());
        getServiceForm().add(domain);

        TextField<String> serviceProviderName = new TextField<String>("serviceProviderName");
        serviceProviderName.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceProviderName",null));
        serviceProviderName.add(new PropertyValidator<>());
        getServiceForm().add(serviceProviderName);

        TextField<String> serviceName = new TextField<String>("serviceName");
        serviceName.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceName",null));
        serviceName.add(new PropertyValidator<>());
        getServiceForm().add(serviceName);

        TextField serviceMinorVersion = new TextField("serviceMinorVersion");
        serviceMinorVersion.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceMinorVersion",null));
        serviceMinorVersion.add(new AttributeModifier("class","small"));
        serviceMinorVersion.add(new PropertyValidator<>());
        getServiceForm().add(serviceMinorVersion);

        TextField serviceMajorVersion = new TextField("serviceMajorVersion");
        serviceMajorVersion.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceMajorVersion",null));
        serviceMajorVersion.add(new AttributeModifier("class","small"));
        serviceMajorVersion.add(new PropertyValidator<>());
        getServiceForm().add(serviceMajorVersion);

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:57,代码来源:LogicalSoapConsumerPanel.java

示例10: initComponents

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalWebGuiPanelIcon",new ResourceModel("webui.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual.webgui", null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
        // Service label
        RequiredTextField<String> label = new RequiredTextField<String>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.gui.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        // Service context root
        RequiredTextField<String> contextRoot = new RequiredTextField<String>("contextRoot.value");
        contextRoot.setLabel(new StringResourceModel("portal.designer.service.gui.contextroot",null));
        contextRoot.add(new PropertyValidator<>());
        getServiceForm().add(contextRoot);

        // Service stateful state
        CheckBox statefulCb = new CheckBox("stateful");
        statefulCb.setLabel(new StringResourceModel("portal.designer.service.gui.stateful",null));
        statefulCb.add(new PropertyValidator<>());
        getServiceForm().add(statefulCb);

        // SLO
        // Service secure state
        CheckBox secureCb = new CheckBox("secure");
//        secureCb.setEnabled(false);
        secureCb.setLabel(new StringResourceModel("portal.designer.service.gui.secure",null));
        secureCb.add(new AttributeAppender("title", new StringResourceModel("portal.designer.service.notAvailable", null), " "));
        secureCb.add(new PropertyValidator<>());
        getServiceForm().add(secureCb);

        // Service max number of sessions
        TextField maxNumberSessions = new TextField("maxNumberSessions");
        maxNumberSessions.setLabel(new StringResourceModel("portal.designer.service.gui.maxNumberSessions",null));
        maxNumberSessions.add(new AttributeModifier("class", "small"));
        maxNumberSessions.add(new PropertyValidator<>());
        getServiceForm().add(maxNumberSessions);

        // Service max request per seconds
        final TextField maxReqPerSeconds = new TextField("maxReqPerSeconds");
        maxReqPerSeconds.setLabel(new StringResourceModel("portal.designer.service.gui.maxReqPerSeconds",null));
        maxReqPerSeconds.add(new AttributeAppender("title", new StringResourceModel("portal.designer.service.notAvailable", null), " "));
        maxReqPerSeconds.add(new PropertyValidator<>());
        getServiceForm().add(maxReqPerSeconds);

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:61,代码来源:LogicalWebGuiServicePanel.java

示例11: initComponents

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalconfig-icon",new ResourceModel("cfconfigservice.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	ExternalLink onlineHelpLinkOverride = new ExternalLink("onlineHelpLinkOverride", completeHelpUrl);

    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    		onlineHelpLinkOverride.setVisible(false);
    	}

    	// Creates 2 blocks only for good displaying : Read more... juste after description (not possible with span wicket:id=descriptionLabel).
    	WebMarkupContainer descriptionBlock = new WebMarkupContainer("descriptionBlock");
    	descriptionBlock.add(onlineHelpLink);
    	getServiceForm().add(descriptionBlock);
    	
    	WebMarkupContainer overrideDescriptionBlock = new WebMarkupContainer("overrideDescriptionBlock");
    	overrideDescriptionBlock.add(onlineHelpLinkOverride);
    	getServiceForm().add(overrideDescriptionBlock);

        if (configOverride) {
        	descriptionBlock.setVisible(false);
        } else {
        	overrideDescriptionBlock.setVisible(false);
        }

    	
        // FUNCTIONNAL PARAMETERS    
        RequiredTextField<String> label = new RequiredTextField<>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.config.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        TextField<String> keyPrefix = new TextField<>("keyPrefix", String.class);
        keyPrefix.setConvertEmptyInputStringToNull(false);
        keyPrefix.setLabel(new StringResourceModel("portal.designer.service.config.keyPrefix", null));
        keyPrefix.add(new PropertyValidator<>());
        getServiceForm().add(keyPrefix);

        configSetContent = new CodeMirrorTextArea<>("configSetContent", readOnly && !configOverride);

        configSetContent.setLabel(new StringResourceModel("portal.designer.service.config.configSetContent", null));
        configSetContent.add(new PropertyValidator<>());
        getServiceForm().add(configSetContent);

        configSetContent.add(new ConfigDuplicateKeysValidator());
        configSetContent.add(new ConfigMaxSizeValidator());
        configSetContent.add(new ConfigMaxNumberKeysValidator());
        configSetContent.add(new InvalidCharsetValidator());

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:60,代码来源:LogicalConfigServicePanel.java

示例12: LogicalQueueReceiveServicePanel

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
public LogicalQueueReceiveServicePanel(String id, IModel<LogicalQueueReceiveService> model, Page parentPage,
        boolean isNew, boolean readOnly, boolean configOverride) {
    super(id, model, parentPage, isNew, readOnly, configOverride);

    getServiceForm().add(new CacheActivatedImage("logicalqueuereceiveServicePanelIcon",new ResourceModel("queuereceive.icon").getObject()));
	// Online help link
	String completeHelpUrl = "";
	try {
		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
    			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
	} catch (Exception e) {
		//do nothing
	}
	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
	getServiceForm().add(onlineHelpLink);
	if (completeHelpUrl.isEmpty()) {
		onlineHelpLink.setVisible(false);
	}
	
    // FUNCTIONNAL PARAMETERS
    RequiredTextField<String> label = new RequiredTextField<String>("label");
    label.setLabel(new StringResourceModel("portal.designer.service.queue_receive.label",null));
    label.add(new PropertyValidator<>());
    getServiceForm().add(label);

    TextField<String> serviceName = new TextField<String>("serviceName");
    serviceName.setLabel(new StringResourceModel("portal.designer.service.queue_receive.serviceName",null));
    serviceName.add(new PropertyValidator<>());
    getServiceForm().add(serviceName);

    TextField serviceVersion = new TextField("serviceVersion");
    serviceVersion.setLabel(new StringResourceModel("portal.designer.service.queue_receive.serviceVersion",null));
    serviceVersion.add(new PropertyValidator<>());
    getServiceForm().add(serviceVersion);

    TextField<String> jndiQueueName = new TextField<String>("jndiQueueName");
    jndiQueueName.setLabel(new StringResourceModel("portal.designer.service.queue_receive.jndiQueueName",null));
    jndiQueueName.add(new AttributeAppender("title", new StringResourceModel("portal.designer.service.queue_receive.preferredJNDI", null), " "));
    jndiQueueName.add(new PropertyValidator<>());
    getServiceForm().add(jndiQueueName);

    DropDownChoice<Long> msgMaxSizeKB = new DropDownChoice<Long>("msgMaxSizeKB", Arrays.asList(maxMsgSizeList));
    msgMaxSizeKB.add(defaultDropDownUpdateBehavior());
    getServiceForm().add(msgMaxSizeKB);
    msgMaxSizeKB.setLabel(new StringResourceModel("portal.designer.service.queue_receive.msgMaxSizeKB",null));
    msgMaxSizeKB.add(new PropertyValidator<>());

    DropDownChoice<Long> maxNbMsgPerDay = new DropDownChoice<Long>("maxNbMsgPerDay", Arrays.asList(maxNbMsgPerDayList));
    maxNbMsgPerDay.add(defaultDropDownUpdateBehavior());
    getServiceForm().add(maxNbMsgPerDay);
    maxNbMsgPerDay.setLabel(new StringResourceModel("portal.designer.service.queue_receive.maxNbMsgPerDay",null));
    maxNbMsgPerDay.add(new PropertyValidator<>());

    DropDownChoice<Long> nbRetentionDay = new DropDownChoice<Long>("nbRetentionDay", Arrays.asList(nbRetentionDayList));
    nbRetentionDay.add(defaultDropDownUpdateBehavior());
    getServiceForm().add(nbRetentionDay);
    nbRetentionDay.setLabel(new StringResourceModel("portal.designer.service.queue_receive.nbRetentionDay",null));
    nbRetentionDay.add(new PropertyValidator<>());
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:60,代码来源:LogicalQueueReceiveServicePanel.java

示例13: LdapCreateUpdatePanel

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的package包/类
public LdapCreateUpdatePanel(CreateUpdateAction action, LdapSetting ldapDescriptor) {
    /**
     * Creating a local copy of the original descriptor so that we can fool around with it without changing the
     * original until we need to save
     */
    super(action, new LdapSetting(ldapDescriptor));
    originalDescriptor = ldapDescriptor;
    setWidth(500);

    add(form);

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

    // Ldap key
    RequiredTextField<String> ldapKeyField = new RequiredTextField<>("key");
    setDefaultFocusField(ldapKeyField);
    ldapKeyField.setEnabled(isCreate());// don't allow key update
    if (isCreate()) {
        ldapKeyField.add(new XsdNCNameValidator("Invalid LDAP key '%s'"));
        ldapKeyField.add(new UniqueXmlIdValidator(centralConfigService.getMutableDescriptor()));
    }
    border.add(ldapKeyField);
    border.add(new SchemaHelpBubble("key.help"));

    border.add(new StyledCheckbox("enabled"));

    TextField<String> ldapUrlField = new RequiredTextField<>("ldapUrl");
    ldapUrlField.add(new UriValidator("ldap", "ldaps"));
    border.add(ldapUrlField);
    border.add(new SchemaHelpBubble("ldapUrl.help"));

    TitledBorder borderDn = new TitledBorder("borderDn");
    form.add(borderDn);
    borderDn.add(new TextField("userDnPattern"));
    borderDn.add(new TextField("emailAttribute"));
    borderDn.add(new SchemaHelpBubble("emailAttribute.help"));
    borderDn.add(new StyledCheckbox("autoCreateUser"));
    borderDn.add(new SchemaHelpBubble("autoCreateUser.help"));
    borderDn.add(new SchemaHelpBubble("userDnPattern.help"));

    addSearchFields(borderDn);

    addTestConnectionFields();

    // Cancel button
    form.add(new ModalCloseLink("cancel"));

    // Submit button
    TitledAjaxSubmitLink submitButton = createSubmitButton();
    form.add(submitButton);
    form.add(new DefaultButtonBehavior(submitButton));

    add(form);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:56,代码来源:LdapCreateUpdatePanel.java

示例14: ProxyCreateUpdatePanel

import org.apache.wicket.markup.html.form.RequiredTextField; //导入方法依赖的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


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