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


Java WebMarkupContainer.setOutputMarkupPlaceholderTag方法代码示例

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


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

示例1: newDiscardedNoteContainer

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
private WebMarkupContainer newDiscardedNoteContainer() {
	WebMarkupContainer discardedNoteContainer = new WebMarkupContainer("discardedNote") {

		@Override
		protected void onConfigure() {
			super.onConfigure();
			setVisible(getPullRequest().isDiscarded());
		}
		
	};
	discardedNoteContainer.setOutputMarkupPlaceholderTag(true);
	return discardedNoteContainer;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:14,代码来源:RequestDetailPage.java

示例2: newChangedContainer

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
private void newChangedContainer(@Nullable AjaxRequestTarget target) {
	WebMarkupContainer changedContainer = new WebMarkupContainer("changed");
	changedContainer.setVisible(change != null);
	changedContainer.setOutputMarkupPlaceholderTag(true);
	if (change != null) {
		changedContainer.add(new BlobDiffPanel("changes", new AbstractReadOnlyModel<Project>() {

			@Override
			public Project getObject() {
				return context.getProject();
			}
			
		}, new Model<PullRequest>(null), change, DiffViewMode.UNIFIED, null, null));
	} else {
		changedContainer.add(new WebMarkupContainer("changes"));
	}
	if (target != null) {
		replace(changedContainer);
		target.add(changedContainer);
		if (change != null) {
			String script = String.format("$('#%s .commit-option input[type=submit]').val('Commit and overwrite');", 
					getMarkupId());
			target.appendJavaScript(script);
		}
	} else {
		add(changedContainer);		
	}
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:29,代码来源:CommitOptionPanel.java

示例3: initLayout

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
private void initLayout(final boolean nullValid, final NonEmptyModel<Boolean> readOnlyModel) {
      WebMarkupContainer placeholderContainer = new WebMarkupContainer(ID_PLACEHOLDER_CONTAINER);
      placeholderContainer.setOutputMarkupPlaceholderTag(true);
      placeholderContainer.setOutputMarkupPlaceholderTag(true);
      placeholderContainer.add(new VisibleEnableBehaviour(){

          @Override
          public boolean isVisible() {
              return getModel().getObject().isEmpty();
          }
      });
      add(placeholderContainer);

      AjaxLink placeholderAdd = new AjaxLink(ID_PLACEHOLDER_ADD) {

          @Override
          public void onClick(AjaxRequestTarget target) {
              addValuePerformed(target);
          }
      };
      placeholderAdd.add(new AttributeAppender("class", new AbstractReadOnlyModel<String>() {

          @Override
          public String getObject() {
              if (buttonsDisabled()) {
                  return " " + CSS_DISABLED;
              }

              return "";
          }
      }));
      placeholderAdd.setOutputMarkupId(true);
      placeholderAdd.setOutputMarkupPlaceholderTag(true);
placeholderAdd.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
      placeholderContainer.add(placeholderAdd);

      ListView repeater = new ListView<T>(ID_REPEATER, getModel()){

          @Override
          protected void populateItem(final ListItem<T> item) {

              DropDownChoice choice = new DropDownChoice<>(ID_INPUT, createDropDownItemModel(item.getModel()),
                      createChoiceList(), createRenderer());
              choice.setNullValid(nullValid);
		choice.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
              item.add(choice);

              WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP);
              item.add(buttonGroup);
              initButtons(buttonGroup, item, readOnlyModel);
          }
      };
      repeater.setOutputMarkupId(true);
      repeater.setOutputMarkupPlaceholderTag(true);
      repeater.add(new VisibleEnableBehaviour(){

          @Override
          public boolean isVisible() {
              return !getModel().getObject().isEmpty();
          }
      });
      add(repeater);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:64,代码来源:MultiValueDropDownPanel.java

示例4: initLayout

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
private void initLayout(final IModel<List<T>> chosenValues, final List<PrismReferenceValue> filterValues,
	final boolean required, final boolean multiselect) {

AjaxLink<String> edit = new AjaxLink<String>(ID_EDIT) {
	private static final long serialVersionUID = 1L;

	@Override
	public void onClick(AjaxRequestTarget target) {
		editValuePerformed(chosenValues.getObject(), filterValues, target, multiselect);
	}
};
edit.setOutputMarkupPlaceholderTag(true);
add(edit);

ListView<T> selectedRowsList = new ListView<T>(ID_SELECTED_ROWS, chosenValues) {

	@Override
	protected void populateItem(ListItem<T> item) {
		WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
		
		textWrapper.setOutputMarkupPlaceholderTag(true);

		TextField<String> text = new TextField<String>(ID_TEXT, createTextModel(item.getModel())); //was value
		text.add(new AjaxFormComponentUpdatingBehavior("blur") {
			private static final long serialVersionUID = 1L;

			@Override
			protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
			}
		});
		text.setRequired(required);
		text.setEnabled(false);
		text.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(text);

		FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
		feedback.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(feedback);

        initButtons(item, item);
        
        item.add(textWrapper);
	}
};
selectedRowsList.setReuseItems(true);
add(selectedRowsList);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:48,代码来源:MultiValueChoosePanel.java

示例5: initLayout

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
private void initLayout(final boolean inputEnabled, final boolean showPlaceholder, final NonEmptyModel<Boolean> readOnlyModel) {
      WebMarkupContainer placeholderContainer = new WebMarkupContainer(ID_PLACEHOLDER_CONTAINER);
      placeholderContainer.setOutputMarkupPlaceholderTag(true);
      placeholderContainer.setOutputMarkupPlaceholderTag(true);
      placeholderContainer.add(new VisibleEnableBehaviour(){

          @Override
          public boolean isVisible() {
              return showPlaceholder && (getModel().getObject() == null || getModel().getObject().isEmpty());
          }
      });
      add(placeholderContainer);

      AjaxLink placeholderAdd = new AjaxLink(ID_PLACEHOLDER_ADD) {

          @Override
          public void onClick(AjaxRequestTarget target) {
              addValuePerformed(target);
          }
      };
      placeholderAdd.add(new AttributeAppender("class", new AbstractReadOnlyModel<String>() {

          @Override
          public String getObject() {
              if (buttonsDisabled()) {
                  return " " + CSS_DISABLED;
              }

              return "";
          }
      }));
placeholderAdd.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
      placeholderAdd.setOutputMarkupId(true);
      placeholderAdd.setOutputMarkupPlaceholderTag(true);
      placeholderContainer.add(placeholderAdd);

      ListView repeater = new ListView<T>(ID_REPEATER, getModel()) {

          @Override
          protected void populateItem(final ListItem<T> item) {
              TextField text = new TextField<>(ID_TEXT, createTextModel(item.getModel()));
              text.add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
              text.add(AttributeAppender.replace("placeholder", createEmptyItemPlaceholder()));
		if (selectedModel != null && item.getModelObject() == selectedModel.getObject()) {
			text.add(AttributeAppender.append("style", "background-color: #FFFFD0;"));			// TODO color constant
		}

		if (!inputEnabled) {
			text.add(new AttributeModifier("disabled", "disabled"));
		}
		item.add(text);

              WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP);
              item.add(buttonGroup);
              initButtons(buttonGroup, item, readOnlyModel);
          }
      };
      repeater.setOutputMarkupId(true);
      repeater.setOutputMarkupPlaceholderTag(true);
      repeater.add(new VisibleEnableBehaviour(){

          @Override
          public boolean isVisible() {
              return getModel().getObject() != null && !getModel().getObject().isEmpty();
          }
      });
      add(repeater);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:69,代码来源:MultiValueTextEditPanel.java

示例6: initDetailsPanel

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
private void initDetailsPanel(WebMarkupContainer parent) {
    WebMarkupContainer detailsContainer = new WebMarkupContainer(ID_DETAILS_PANEL);
    detailsContainer.setOutputMarkupId(true);
    detailsContainer.setOutputMarkupPlaceholderTag(true);
    parent.add(detailsContainer);

    Label displayName = new Label(ID_DETAILS_DISPLAY_NAME, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_DISPLAY_NAME));
    detailsContainer.add(displayName);

    Label description = new Label(ID_DETAILS_DESCRIPTION, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_DESCRIPTION));
    detailsContainer.add(description);

    Label kind = new Label(ID_DETAILS_KIND, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_KIND));
    detailsContainer.add(kind);

    Label intent = new Label(ID_DETAILS_INTENT, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_INTENT));
    detailsContainer.add(intent);

    Label nativeObjectClass = new Label(ID_DETAILS_NATIVE_OBJECT_CLASS, new PropertyModel<String>(detailsModel, ObjectClassDetailsDto.F_NATIVE_OBJECT_CLASS));
    detailsContainer.add(nativeObjectClass);

    CheckBox isDefault = new CheckBox(ID_DETAILS_DEFAULT, new PropertyModel<Boolean>(detailsModel, ObjectClassDetailsDto.F_IS_DEFAULT));
    isDefault.setEnabled(false);
    detailsContainer.add(isDefault);

    Label kindTooltip = new Label(ID_T_KIND);
    kindTooltip.add(new InfoTooltipBehavior());
    detailsContainer.add(kindTooltip);

    Label intentTooltip = new Label(ID_T_INTENT);
    intentTooltip.add(new InfoTooltipBehavior());
    detailsContainer.add(intentTooltip);

    Label nativeObjClassTooltip = new Label(ID_T_NATIVE_OBJECT_CLASS);
    nativeObjClassTooltip.add(new InfoTooltipBehavior());
    detailsContainer.add(nativeObjClassTooltip);

    Label defaultTooltip = new Label(ID_T_DEFAULT);
    defaultTooltip.add(new InfoTooltipBehavior());
    detailsContainer.add(defaultTooltip);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:42,代码来源:SchemaListPanel.java

示例7: createExtraContentContainer

import org.apache.wicket.markup.html.WebMarkupContainer; //导入方法依赖的package包/类
protected WebMarkupContainer createExtraContentContainer(String extraContentId, ObjectSelectionPanel objectSelectionPanel) {
    WebMarkupContainer container = new WebMarkupContainer(extraContentId);
    container.setOutputMarkupId(true);
    container.setOutputMarkupPlaceholderTag(true);
    return container;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:7,代码来源:ObjectSelectionPanel.java


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