當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。