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


Java TextArea.add方法代码示例

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


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

示例1: initLayout

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
protected void initLayout(NonEmptyModel<Boolean> readOnlyModel) {

		TextArea<String> description = new TextArea<>(ID_DESCRIPTION,
				new PropertyModel<String>(getModel(), SearchFilterType.F_DESCRIPTION.getLocalPart()));
		description.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
		add(description);

		AceEditor clause = new AceEditor(ID_FILTER_CLAUSE, clauseStringModel);
		clause.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
		add(clause);

        AjaxSubmitLink update = new AjaxSubmitLink(ID_BUTTON_UPDATE) {

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                updateClausePerformed(target);
            }
        };
		update.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
        add(update);

        Label clauseTooltip = new Label(ID_T_CLAUSE);
        clauseTooltip.add(new InfoTooltipBehavior());
        add(clauseTooltip);
    }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:26,代码来源:SearchFilterPanel.java

示例2: AutosizePage

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
public AutosizePage(PageParameters parameters) {
	super(parameters);
	
	addBreadCrumbElement(new BreadCrumbElement(new ResourceModel("widgets.menu.autosize"), AutosizePage.linkDescriptor()));
	
	TextArea<String> defaultBehavior = new TextArea<String>("defaultBehavior");
	defaultBehavior.add(new AutosizeBehavior());
	add(defaultBehavior);
	
	TextArea<String> withMaxHeight = new TextArea<String>("withMaxHeight");
	withMaxHeight.add(new AutosizeBehavior());
	add(withMaxHeight);
	
	MultiLineLabel multiLineLabel = new MultiLineLabel("multiLineLabel", new ResourceModel("widgets.autosize.more.text"));
	multiLineLabel.add(new MoreBehavior());
	add(multiLineLabel);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:18,代码来源:AutosizePage.java

示例3: TextAreaPanel

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
public TextAreaPanel(String id, IModel<T> model, Integer rowsOverride) {
      super(id);

      final TextArea<T> text = new TextArea<T>(ID_INPUT, model);
if (rowsOverride != null) {
	text.add(new AttributeModifier("rows", rowsOverride));
}
      add(text);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:10,代码来源:TextAreaPanel.java

示例4: LicensePanel

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

    add(new Label("licenseKeyLabel", "License Key") {
        @Override
        public final boolean isVisible() {
            return !addonsManager.isPartnerLicense();
        }
    });
    add(new HelpBubble("licenseKey.help",
            "A license key that uniquely validates this Artifactory server instance.\n" +
                    "The license key is required for using Artifactory Add-ons.") {
        @Override
        public final boolean isVisible() {
            return !addonsManager.isPartnerLicense();
        }
    });
    licenseKey = addonsManager.getLicenseKey();
    TextArea<String> licenseKeyTextField = new TextArea<String>("licenseKey",
            new PropertyModel<String>(this, "licenseKey")) {
        @Override
        public final boolean isVisible() {
            return !addonsManager.isPartnerLicense();
        }
    };
    licenseKeyTextField.add(new LicenseKeyValidator());
    add(licenseKeyTextField);

    FieldSetBorder licenseDetails = new FieldSetBorder("licenseDetails");
    add(licenseDetails);
    if (!addonsManager.isLicenseInstalled()) {
        licenseDetails.setVisible(false);
    } else {
        String[] details = addonsManager.getLicenseDetails();
        licenseDetails.add(new Label("subject", details[0]));
        licenseDetails.add(new Label("expiry", details[1]));
        licenseDetails.add(new Label("type", details[2]));
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:41,代码来源:LicensePanel.java

示例5: TextAreaInput

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
public TextAreaInput(String id, IModel<T> model) {
    super(id, model);

    TextArea<T> text = new TextArea<T>(ID_INPUT, model);
    text.add(AttributeAppender.replace("rows", new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            return Integer.toString(rows);
        }
    }));
    add(text);
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:14,代码来源:TextAreaInput.java

示例6: setRows

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
public void setRows(int rows) {
    TextArea area = (TextArea) get(createComponentPath(ID_TEXT_WRAPPER, ID_TEXT));
    area.add(AttributeModifier.replace("rows", rows));
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:5,代码来源:AceEditorFormGroup.java

示例7: initLayout

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize,
                          String textSize, boolean required, int rowNumber) {
      WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
      add(labelContainer);

      Label l = new Label(ID_LABEL, label);
      if (StringUtils.isNotEmpty(labelSize)) {
          labelContainer.add(AttributeAppender.prepend("class", labelSize));
      }
      labelContainer.add(l);

Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
      tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {

          @Override
          public String getObject() {
              return getString(tooltipKey);
}
      }));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {

	@Override
	public boolean isVisible() {
		return tooltipKey != null;
	}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);		

      WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
      if (StringUtils.isNotEmpty(textSize)) {
          textWrapper.add(AttributeAppender.prepend("class", textSize));
      }
      add(textWrapper);

      TextArea text = new TextArea<>(ID_TEXT, getModel());
      text.add(new AttributeModifier("rows", rowNumber));
      text.setOutputMarkupId(true);
      text.setRequired(required);
      text.setLabel(label);
      text.add(AttributeAppender.replace("placeholder", label));
      textWrapper.add(text);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:46,代码来源:TextAreaFormGroup.java

示例8: initBasicInfoLayout

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void initBasicInfoLayout() {
	
	final TextField nameField = new TextField(ID_NAME, new PropertyModel<>(getModel(), CertDefinitionDto.F_NAME));
	nameField.add(new VisibleEnableBehaviour() {
		@Override
		public boolean isEnabled() {
			return true;
		}
	});
	add(nameField);

	final TextArea descriptionField = new TextArea(ID_DESCRIPTION, new PropertyModel<>(getModel(), CertDefinitionDto.F_DESCRIPTION));
	descriptionField.add(new VisibleEnableBehaviour() {
		@Override
		public boolean isEnabled() {
			return true;
		}
	});
	add(descriptionField);

	final WebMarkupContainer ownerRefChooser = createOwnerRefChooser(ID_OWNER_REF_CHOOSER);
	ownerRefChooser.setOutputMarkupId(true);
	add(ownerRefChooser);

	DropDownChoice remediation = new DropDownChoice<>(ID_REMEDIATION, new Model<AccessCertificationRemediationStyleType>() {

		@Override
		public AccessCertificationRemediationStyleType getObject() {
			return getModel().getObject().getRemediationStyle();
		}

		@Override
		public void setObject(AccessCertificationRemediationStyleType object) {
			getModel().getObject().setRemediationStyle(object);
		}
	}, WebComponentUtil.createReadonlyModelFromEnum(AccessCertificationRemediationStyleType.class),
			new EnumChoiceRenderer<>(this));
	add(remediation);

	DropDownChoice outcomeStrategy =
			new DropDownChoice<>(ID_OUTCOME_STRATEGY,
					new PropertyModel<>(getModel(), CertDefinitionDto.F_OUTCOME_STRATEGY),
					WebComponentUtil.createReadonlyModelFromEnum(AccessCertificationCaseOutcomeStrategyType.class),
					new EnumChoiceRenderer<>(this));
	add(outcomeStrategy);

	add(WebComponentUtil.createHelp(ID_OUTCOME_STRATEGY_HELP));

	Label stopReviewOn = new Label(ID_STOP_REVIEW_ON, new AbstractReadOnlyModel<String>() {
		@Override
		public String getObject() {
			List<AccessCertificationResponseType> stopOn = getModel().getObject().getStopReviewOn();
			return CertMiscUtil.getStopReviewOnText(stopOn, getPageBase());
		}
	});
	add(stopReviewOn);

	//        add(new Label(ID_REVIEW_STAGE_CAMPAIGNS, new PropertyModel<>(getModel(), CertDefinitionDto.F_NUMBER_OF_STAGES)));
	//        add(new Label(ID_CAMPAIGNS_TOTAL, new PropertyModel<>(getModel(), CertDefinitionDto.F_NUMBER_OF_STAGES)));
	add(new Label(ID_LAST_STARTED, new PropertyModel<>(getModel(), CertDefinitionDto.F_LAST_STARTED)));
	add(new Label(ID_LAST_CLOSED, new PropertyModel<>(getModel(), CertDefinitionDto.F_LAST_CLOSED)));
	add(WebComponentUtil.createHelp(ID_LAST_STARTED_HELP));
	add(WebComponentUtil.createHelp(ID_LAST_CLOSED_HELP));
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:65,代码来源:DefinitionBasicPanel.java

示例9: createAppForm

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

        appForm = new Form<>("appForm", new CompoundPropertyModel<>(new FirstApplicationReleaseInfos()));

        TextField<String> appLabel = new TextField<>("appLabel");
        appLabel.setLabel(WicketUtils.getStringResourceModel(this, "portal.application.label.label"));

        appLabel.add(new AbstractValidator<String>() {
            @Override
            protected void onValidate(IValidatable<String> iValidatable) {
                if(!parentPage.isApplicationLabelUnique(iValidatable.getValue())) {
                    error(iValidatable);
                }
            }

            @Override
            protected String resourceKey() {
                return "portal.application.label.non.unique";
            }

            @Override
            protected Map<String, Object> variablesMap(IValidatable<String> stringIValidatable) {
                Map<String, Object> map = super.variablesMap(stringIValidatable);
                map.put("label", stringIValidatable.getValue());
                return map;
            }
        });
        appLabel.add(new PropertyValidator<>());
        appForm.add(appLabel);

        TextField<String> appCode = new TextField<>("appCode");
        appCode.setLabel(WicketUtils.getStringResourceModel(this, "portal.application.code.label"));
        appCode.add(new PropertyValidator<>());
        appForm.add(appCode);

        TextArea<String> appDescription = new TextArea<>("appDescription");
        appDescription.setLabel(WicketUtils.getStringResourceModel(this, "portal.application.description.label"));
        appDescription.add(new PropertyValidator<>());
        appForm.add(appDescription);

        RadioGroup<Boolean> appVisibility = new RadioGroup<>("appPublic");
        appVisibility.add(new Radio<Boolean>("appVisibilityRadioGroup-public", new Model<>(Boolean.TRUE)));
        appVisibility.add(new Radio<Boolean>("appVisibilityRadioGroup-private", new Model<>(Boolean.FALSE)));
        appVisibility.add(new PropertyValidator<>());
        appForm.add(appVisibility);
        appForm.add(new CacheActivatedImage("imageHelp.visibilityField", new ResourceModel("image.help").getObject()));

        TextField<String> members = new TextField<>("members");
        members.add(new PropertyValidator<>());
        appForm.add(members);
        appForm.add(new CacheActivatedImage("imageHelp.membersField", new ResourceModel("image.help").getObject()));

        releaseFiedsetPanel = new ReleaseFieldsetPanel("releaseFieldsetPanel", parentPage, manageApplicationRelease);
        appForm.add(releaseFiedsetPanel);

        createFormButtons(appForm);

        // set default visibility to private
        appForm.getModelObject().setAppPublic(Boolean.FALSE);

        add(appForm);
    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:63,代码来源:ApplicationCreatePanel.java

示例10: newBugReportForm

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private Form<Void> newBugReportForm(Throwable t) {
	final Form<Void> form = new Form<Void>("form") {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onSubmit() {
			try {
				reportIssue(report);

				// set thank you message and return to home page
				setResponsePage(
						getApplication().getHomePage(),
						new PageParameters().set(MESSAGE_PARAM, getString("success.message")).set(LEVEL_PARAM,
								FeedbackMessage.SUCCESS));
			} catch (NotificationException e) {
				String message = getString("fail.message");
				logger.error(message, e);
				getPage().error(message);
			}
		}
	};

	TextField<String> userNameField = new TextField<>("userName", new PropertyModel<String>(ErrorPage.this, "userName"));
	TextField<String> userMailField = new TextField<>("userMail", new PropertyModel<String>(ErrorPage.this, "userMail"));
	UQSession session = UQSession.get();
	if (session != null && session.isAuthenticated()) {
		this.userName = session.getLoggedInUser().getFullName();
		this.userMail = session.getLoggedInUser().getMail();
		if (!session.getLoggedInUser().hasAnyRoles(Role.Administrator)) {
			userNameField.setEnabled(false);
			userMailField.setEnabled(false);
		}
	}
	form.add(userNameField);
	form.add(userMailField);
	TextArea<String> description = new TextArea<>("report", new PropertyModel<String>(ErrorPage.this, "report"));
	description.add(new TinyMceBehavior(DefaultTinyMCESettings.get()));
	form.add(description);
	Button btnStacktraceShow = new Button("stacktrace.show");
	btnStacktraceShow.setVisible(canSeeStackTrace(t));
	Label stackTrace = new Label("stacktrace.text", t != null ? Model.of(getStackTraceForOutput(t)) : Model.of(""));
	WebMarkupContainer stackTraceContainer = new WebMarkupContainer("stacktrace.container");
	stackTraceContainer.add(stackTrace);
	stackTraceContainer.setVisible(canSeeStackTrace(t));
	form.add(stackTraceContainer);
	form.add(btnStacktraceShow);
	return form;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:49,代码来源:ErrorPage.java

示例11: initLayout

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize,
                          String textSize, boolean required, int rowNumber) {
      WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
      add(labelContainer);

      Label l = new Label(ID_LABEL, label);
      if (StringUtils.isNotEmpty(labelSize)) {
          labelContainer.add(AttributeAppender.prepend("class", labelSize));
      }
      labelContainer.add(l);

Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
      tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {

          @Override
          public String getObject() {
              return getString(tooltipKey);
}
      }));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {

	@Override
	public boolean isVisible() {
		return tooltipKey != null;
	}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);

      WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
      if (StringUtils.isNotEmpty(textSize)) {
          textWrapper.add(AttributeAppender.prepend("class", textSize));
      }
      add(textWrapper);

      TextArea text = new TextArea<>(ID_TEXT, getModel());
      text.add(new AttributeModifier("rows", rowNumber));
      text.setOutputMarkupId(true);
      text.setRequired(required);
      text.setLabel(label);
      text.add(AttributeAppender.replace("placeholder", label));
      textWrapper.add(text);
  }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:46,代码来源:TextAreaFormGroup.java

示例12: initBasicInfoLayout

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

		final TextField nameField = new TextField(ID_NAME, new PropertyModel<>(getModel(), CertDefinitionDto.F_NAME));
		nameField.add(new VisibleEnableBehaviour() {
			@Override
			public boolean isEnabled() {
				return true;
			}
		});
		add(nameField);

		final TextArea descriptionField = new TextArea(ID_DESCRIPTION, new PropertyModel<>(getModel(), CertDefinitionDto.F_DESCRIPTION));
		descriptionField.add(new VisibleEnableBehaviour() {
			@Override
			public boolean isEnabled() {
				return true;
			}
		});
		add(descriptionField);

		final WebMarkupContainer ownerRefChooser = createOwnerRefChooser(ID_OWNER_REF_CHOOSER);
		ownerRefChooser.setOutputMarkupId(true);
		add(ownerRefChooser);

		DropDownChoice remediation = new DropDownChoice<>(ID_REMEDIATION, new Model<AccessCertificationRemediationStyleType>() {

			@Override
			public AccessCertificationRemediationStyleType getObject() {
				return getModel().getObject().getRemediationStyle();
			}

			@Override
			public void setObject(AccessCertificationRemediationStyleType object) {
				getModel().getObject().setRemediationStyle(object);
			}
		}, WebComponentUtil.createReadonlyModelFromEnum(AccessCertificationRemediationStyleType.class),
				new EnumChoiceRenderer<>(this));
		add(remediation);

		DropDownChoice outcomeStrategy =
				new DropDownChoice<>(ID_OUTCOME_STRATEGY,
						new PropertyModel<>(getModel(), CertDefinitionDto.F_OUTCOME_STRATEGY),
						WebComponentUtil.createReadonlyModelFromEnum(AccessCertificationCaseOutcomeStrategyType.class),
						new EnumChoiceRenderer<>(this));
		add(outcomeStrategy);

		add(WebComponentUtil.createHelp(ID_OUTCOME_STRATEGY_HELP));

		Label stopReviewOn = new Label(ID_STOP_REVIEW_ON, new AbstractReadOnlyModel<String>() {
			@Override
			public String getObject() {
				List<AccessCertificationResponseType> stopOn = getModel().getObject().getStopReviewOn();
				return CertMiscUtil.getStopReviewOnText(stopOn, getPageBase());
			}
		});
		add(stopReviewOn);

		//        add(new Label(ID_REVIEW_STAGE_CAMPAIGNS, new PropertyModel<>(getModel(), CertDefinitionDto.F_NUMBER_OF_STAGES)));
		//        add(new Label(ID_CAMPAIGNS_TOTAL, new PropertyModel<>(getModel(), CertDefinitionDto.F_NUMBER_OF_STAGES)));
		add(new Label(ID_LAST_STARTED, new PropertyModel<>(getModel(), CertDefinitionDto.F_LAST_STARTED)));
		add(new Label(ID_LAST_CLOSED, new PropertyModel<>(getModel(), CertDefinitionDto.F_LAST_CLOSED)));
		add(WebComponentUtil.createHelp(ID_LAST_STARTED_HELP));
		add(WebComponentUtil.createHelp(ID_LAST_CLOSED_HELP));
	}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:65,代码来源:DefinitionBasicPanel.java


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