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


Java TextArea.setOutputMarkupId方法代码示例

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


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

示例1: addExcludesPatternFields

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void addExcludesPatternFields(StringResourceModel helpMessage,
        final List<CommonPathPattern> includesExcludesSuggestions) {
    TextArea excludesTa = new TextArea("excludesPattern");
    excludesTa.setEnabled(isSystemAdmin());
    excludesTa.setOutputMarkupId(true);
    add(excludesTa);

    add(new HelpBubble("excludesHelp", helpMessage));

    //Excludes suggestions
    Model<CommonPathPattern> exclude = new Model<>();
    DropDownChoice<CommonPathPattern> excludesSuggest = new DropDownChoice<>(
            "excludesSuggest", exclude, includesExcludesSuggestions);
    if (!includesExcludesSuggestions.isEmpty()) {
        excludesSuggest.setDefaultModelObject(includesExcludesSuggestions.get(0));
    }
    excludesSuggest.add(new UpdatePatternsBehavior(exclude, excludesTa));
    excludesSuggest.setEnabled(isSystemAdmin());
    add(excludesSuggest);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:21,代码来源:RepositoriesTabPanel.java

示例2: addIncludesPatternFields

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void addIncludesPatternFields(StringResourceModel helpMessage,
        final List<CommonPathPattern> includesExcludesSuggestions) {
    TextArea includesTa = new TextArea("includesPattern");
    includesTa.setEnabled(isSystemAdmin());
    includesTa.setOutputMarkupId(true);
    add(includesTa);

    add(new HelpBubble("includesHelp", helpMessage));

    Model<CommonPathPattern> include = new Model<>();
    DropDownChoice<CommonPathPattern> includesSuggest = new DropDownChoice<>(
            "includesSuggest", include, includesExcludesSuggestions);
    if (!includesExcludesSuggestions.isEmpty()) {
        includesSuggest.setDefaultModelObject(includesExcludesSuggestions.get(0));
    }
    includesSuggest.add(new UpdatePatternsBehavior(include, includesTa));
    if (parent.isCreate()) {
        includesSuggest.setDefaultModelObject(CommonPathPattern.ANY);
    }
    includesSuggest.setEnabled(isSystemAdmin());
    add(includesSuggest);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:23,代码来源:RepositoriesTabPanel.java

示例3: 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

示例4: MyBusinessEdit

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
public MyBusinessEdit(final String id, final UserProfile userProfile,
		List<CompanyProfile> companyProfilesToAdd,
		List<CompanyProfile> companyProfilesToRemove,
		TabDisplay tabDisplay) {

	super(id);

	log.debug("MyBusinessEdit()");

	this.companyProfilesToAdd = companyProfilesToAdd;
	this.companyProfilesToRemove = companyProfilesToRemove;

	// heading
	add(new Label("heading", new ResourceModel("heading.business.edit")));

	// setup form
	Form form = new Form("form", new Model(userProfile));
	form.setOutputMarkupId(true);

	// form submit feedback
	final Label formFeedback = new Label("formFeedback");
	formFeedback.setOutputMarkupPlaceholderTag(true);
	form.add(formFeedback);

	// add warning message if superUser and not editing own profile
	Label editWarning = new Label("editWarning");
	editWarning.setVisible(false);
	if (sakaiProxy.isSuperUserAndProxiedToUser(
			userProfile.getUserUuid())) {
		editWarning.setDefaultModel(new StringResourceModel(
				"text.edit.other.warning", null, new Object[] { userProfile
						.getDisplayName() }));
		editWarning.setEscapeModelStrings(false);
		editWarning.setVisible(true);
	}
	form.add(editWarning);

	// business biography
	WebMarkupContainer businessBiographyContainer = new WebMarkupContainer(
			"businessBiographyContainer");
	businessBiographyContainer.add(new Label("businessBiographyLabel",
			new ResourceModel("profile.business.bio")));
	TextArea businessBiography = new TextArea(
			"businessBiography", new PropertyModel<String>(userProfile,
					"businessBiography"));
	businessBiography.setMarkupId("businessbioinput");
	businessBiography.setOutputMarkupId(true);
	//businessBiography.setEditorConfig(CKEditorConfig.createCkConfig());
	businessBiographyContainer.add(businessBiography);
	form.add(businessBiographyContainer);

	// company profiles
	WebMarkupContainer companyProfileEditsContainer = createCompanyProfileEditsContainer(userProfile, tabDisplay);
	form.add(companyProfileEditsContainer);

	AjaxFallbackButton addCompanyProfileButton = createAddCompanyProfileButton(
			id, userProfile, form, formFeedback);
	form.add(addCompanyProfileButton);

	AjaxFallbackButton removeCompanyProfileButton = createRemoveCompanyProfileButton(
			id, userProfile, form);
	form.add(removeCompanyProfileButton);

	AjaxFallbackButton submitButton = createSaveChangesButton(id,
			userProfile, form, formFeedback);
	//submitButton.add(new CKEditorTextArea.CKEditorAjaxSubmitModifier());
	form.add(submitButton);

	AjaxFallbackButton cancelButton = createCancelChangesButton(id,
			userProfile, form);
	form.add(cancelButton);

	add(form);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:75,代码来源:MyBusinessEdit.java

示例5: CompanyProfileEdit

import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
public CompanyProfileEdit(String id, CompanyProfile companyProfile) {

		super(id, new Model(companyProfile));

		WebMarkupContainer companyNameContainer = new WebMarkupContainer(
				"companyNameContainer");
		companyNameContainer.add(new Label("companyNameLabel",
				new ResourceModel("profile.business.company.name")));
		TextField companyName = new TextField("companyName",
				new PropertyModel(companyProfile, "companyName"));
		companyName.setOutputMarkupId(true);
		companyNameContainer.add(companyName);
		String companyNameId = companyName.getMarkupId();
		Label companyNameAccessibilityLabel = new Label("companyNameAccessibilityLabel", new ResourceModel("accessibility.profile.companyname.input"));
		companyNameAccessibilityLabel.add(new AttributeAppender("for",new Model(companyNameId)," "));
		companyNameContainer.add(companyNameAccessibilityLabel);

		add(companyNameContainer);

		WebMarkupContainer companyWebAddressContainer = new WebMarkupContainer(
				"companyWebAddressContainer");
		companyWebAddressContainer.add(new Label("companyWebAddressLabel",
				new ResourceModel("profile.business.company.web")));

		TextField companyWebAddress = new TextField("companyWebAddress",
				new PropertyModel(companyProfile, "companyWebAddress")) {

			private static final long serialVersionUID = 1L;

			// add http:// if missing
			@Override
			protected void convertInput() {
				String input = getInput();

				if (StringUtils.isNotBlank(input)
						&& !(input.startsWith("http://") || input
								.startsWith("https://"))) {
					setConvertedInput("http://" + input);
				} else {
					setConvertedInput(StringUtils.isBlank(input) ? null : input);
				}
			}
		};
		companyWebAddress.setOutputMarkupId(true);
		companyWebAddress.add(new UrlValidator());
		companyWebAddressContainer.add(companyWebAddress);
		String companyUrlId = companyWebAddress.getMarkupId();
		Label companyUrlAccessibilityLabel = new Label("companyUrlAccessibilityLabel", new ResourceModel("accessibility.profile.companyurl.input"));
		companyUrlAccessibilityLabel.add(new AttributeAppender("for",new Model(companyUrlId)," "));
		companyWebAddressContainer.add(companyUrlAccessibilityLabel);

		final FeedbackLabel companyWebAddressFeedback = new FeedbackLabel(
				"companyWebAddressFeedback", companyWebAddress);
		companyWebAddressFeedback.setOutputMarkupId(true);
		companyWebAddressContainer.add(companyWebAddressFeedback);
		companyWebAddress.add(new ComponentVisualErrorBehaviour("onblur",
				companyWebAddressFeedback));
		companyWebAddress.add(new AttributeAppender("aria-describedby",new Model(companyWebAddressFeedback.getMarkupId())," "));

		add(companyWebAddressContainer);

		WebMarkupContainer companyDescriptionContainer = new WebMarkupContainer(
				"companyDescriptionContainer");
		companyDescriptionContainer.add(new Label("companyDescriptionLabel",
				new ResourceModel("profile.business.company.description")));
		TextArea companyDescription = new TextArea("companyDescription",
				new PropertyModel(companyProfile, "companyDescription"));
		companyDescription.setOutputMarkupId(true);
		companyDescriptionContainer.add(companyDescription);
		String companyDescriptionId = companyDescription.getMarkupId();
		Label companyDescriptionAccessibilityLabel = new Label("companyDescriptionAccessibilityLabel", new ResourceModel("accessibility.profile.companydescription.input"));
		companyDescriptionAccessibilityLabel.add(new AttributeAppender("for",new Model(companyDescriptionId)," "));
		companyDescriptionContainer.add(companyDescriptionAccessibilityLabel);

		add(companyDescriptionContainer);
	}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:77,代码来源:CompanyProfileEdit.java

示例6: 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


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