當前位置: 首頁>>代碼示例>>Java>>正文


Java ComponentTag.put方法代碼示例

本文整理匯總了Java中org.apache.wicket.markup.ComponentTag.put方法的典型用法代碼示例。如果您正苦於以下問題:Java ComponentTag.put方法的具體用法?Java ComponentTag.put怎麽用?Java ComponentTag.put使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.markup.ComponentTag的用法示例。


在下文中一共展示了ComponentTag.put方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: linkCubesQuery

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
/**
 * @return
 */
private ExternalLink linkCubesQuery(
		final CubesMetricMeasurement cubesMetricMeasurement) {

	ExternalLink link = new  ExternalLink("linkCubesQuery", cubesMetricMeasurement.getSelf()){
		private static final long serialVersionUID = 1L;

		@Override
		protected void onComponentTag(ComponentTag tag) {
			super.onComponentTag(tag);
			tag.put("target","_blank");
		}
	};
	link.add(new Label("cubesMetric", new PropertyModel<String>(
			cubesMetricMeasurement, "cubesMetric")));

	// tooltip config
	TooltipConfig confConfig = new TooltipConfig()
			.withPlacement(TooltipConfig.Placement.top);
	link.add(new TooltipBehavior(new PropertyModel<String>(cubesMetricMeasurement,
			"self"), confConfig));

	return link;
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:27,代碼來源:CubeAnalysisDataManagementPage.java

示例2: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag)
{
	super.onComponentTag(tag);

	if (isEnabledInHierarchy())
	{
		if (tag.getName().equalsIgnoreCase("a"))
		{
			tag.put("href", "#");
		}
	}
	else
	{
		disableLink(tag);
	}
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:18,代碼來源:BlankLink.java

示例3: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	
	if (isEnabledInHierarchy() == false) {
		disableLink(tag);
	} else if (getDefaultModel() != null) {
		Object hrefValue = getDefaultModelObject();
		if (hrefValue != null) {
			String url = MAILTO_PREFIX + hrefValue.toString();
			
			// if the tag is an anchor proper
			if (tag.getName().equalsIgnoreCase("a") || tag.getName().equalsIgnoreCase("link")
					|| tag.getName().equalsIgnoreCase("area")) {
				// generate the href attribute
				tag.put("href", url);
			}
		}
	}
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:21,代碼來源:EmailLink.java

示例4: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(Component component, ComponentTag tag) {
	String original = tag.getAttribute("title");
	
	super.onComponentTag(component, tag);
	
	// hack here
	String current = tag.getAttribute("title");
	if (!Strings.isNullOrEmpty(original) && Strings.isNullOrEmpty(current)) {
		tag.put("title", original);
	}
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:13,代碼來源:TooltipBehavior.java

示例5: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	
	tag.setName("img");
	tag.append("class", "avatar", " ");
	tag.put("src", url);
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:9,代碼來源:Avatar.java

示例6: createRoleLink

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
private Component createRoleLink(String id, IModel<PrismObject<R>> model) {
    AjaxLink<PrismObject<R>> button = new AjaxLink<PrismObject<R>>(id, model) {

        @Override
        public IModel<?> getBody() {
            return new Model<String>(getModel().getObject().asObjectable().getName().getOrig());
        }

        @Override
        public void onClick(AjaxRequestTarget target) {
            LOGGER.trace("{} CLICK: {}", this, getModel().getObject());
            toggleRole(getModel().getObject());
            target.add(this);
        }

        @Override
        protected void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            PrismObject<R> role = getModel().getObject();
            if (isSelected(role)) {
                tag.put("class", "list-group-item active");
            } else {
                tag.put("class", "list-group-item");
            }
            String description = role.asObjectable().getDescription();
            if (description != null) {
                tag.put("title", description);
            }
        }
    };
    button.setOutputMarkupId(true);
    return button;
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:34,代碼來源:SimpleRoleSelector.java

示例7: createParamLink

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
private Component createParamLink(String id, IModel<String> itemModel) {
    AjaxLink<String> button = new AjaxLink<String>(id, itemModel) {

        @Override
        public IModel<?> getBody() {
            return new Model<String>(getModel().getObject());
        }

        @Override
        public void onClick(AjaxRequestTarget target) {
            LOGGER.trace("{} CLICK param: {}", this, getModel().getObject());
            toggleParam(getModel().getObject());
            target.add(SimpleParametricRoleSelector.this);
        }

        @Override
        protected void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            String param = getModel().getObject();
            if (param.equals(selectedParam)) {
                tag.put("class", "list-group-item active");
            } else {
                tag.put("class", "list-group-item");
            }
        }
    };
    button.setOutputMarkupId(true);
    return button;
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:30,代碼來源:SimpleParametricRoleSelector.java

示例8: newTabContainer

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
/**
 * Generates a loop item used to represent a specific tab's <code>li</code> element.
 *
 * @param tabIndex
 * @return new loop item
 */
protected LoopItem newTabContainer(final int tabIndex) {
    return new LoopItem(tabIndex) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onConfigure() {
            super.onConfigure();

            setVisible(getVisiblityCache().isVisible(tabIndex));
        }

        @Override
        protected void onComponentTag(final ComponentTag tag) {
            super.onComponentTag(tag);

            String cssClass = tag.getAttribute("class");
            if (cssClass == null) {
                cssClass = " ";
            }
            cssClass += " tab" + getIndex();

            if (getIndex() == getSelectedTab()) {
                cssClass += ' ' + getSelectedTabCssClass();
            }
            if (getVisiblityCache().getLastVisible() == getIndex()) {
                cssClass += ' ' + getLastTabCssClass();
            }
            tag.put("class", cssClass.trim());
        }
    };
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:38,代碼來源:TabbedPanel.java

示例9: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
    super.onComponentTag(tag);

    if (!isEnabled()) {
        tag.put("disabled", "disabled");
    }

    if (tag.isOpenClose()) {
        tag.setType(XmlTag.TagType.OPEN);
    }
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:13,代碼來源:AjaxSubmitButton.java

示例10: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
/**
 * Handles this frame's tag.
 *
 * @param tag the component tag
 * @see org.apache.wicket.Component#onComponentTag(ComponentTag)
 */
@Override
protected final void onComponentTag(final ComponentTag tag) {
	this.checkComponentTag(tag, "iframe");

	// generate the src attribute
	tag.put("src", this.URL);

	super.onComponentTag(tag);
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:16,代碼來源:ExternalPage.java

示例11: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected final void onComponentTag(final ComponentTag tag) {
	this.checkComponentTag(tag, "span");

	// generate the class attribute
	tag.put("class", this.textEmphasisClass.getClassValue());

	super.onComponentTag(tag);
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:10,代碼來源:BootStrapLabel.java

示例12: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	if(style != null && !"null".equals(style)) {
		tag.put("style", style);
	}
	super.onComponentTag(tag);
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:8,代碼來源:StylableSelectOptions.java

示例13: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(final ComponentTag tag) {
    super.onComponentTag(tag);
    checkComponentTag(tag, "a");

    final String userUuid = this.getDefaultModelObjectAsString();

    // image url, cached for a minute
    final String imageUrl = "/direct/profile/" + userUuid + "/image/thumb" + "?t="
            + TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis());

    // output image
    tag.put("style", "background-image:url(" + imageUrl + ")");
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:15,代碼來源:ProfileThumbnail.java

示例14: disableLink

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void disableLink(final ComponentTag tag) {
    if (isBootstrapButtonStyle(tag)) {
        tag.setName("button");
        tag.put("type", "button");
        tag.append("class", "btn-disabled", " ");
    }
    super.disableLink(tag);
    tag.setName("a"); //for bootstrap it should be a and not span
}
 
開發者ID:subes,項目名稱:invesdwin-nowicket,代碼行數:11,代碼來源:AModelAjaxFallbackLink.java

示例15: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(final ComponentTag tag) {
    maybeSetTargetBlank(tag);
    if ("iframe".equals(tag.getName())) {
        //add support for iframe
        final String url = getURL().toString();
        tag.put("src", url);
    } else {
        super.onComponentTag(tag);
    }
}
 
開發者ID:subes,項目名稱:invesdwin-nowicket,代碼行數:12,代碼來源:ModelResourceLink.java


注:本文中的org.apache.wicket.markup.ComponentTag.put方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。