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


Java ComponentTag.setName方法代碼示例

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


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

示例1: getLink

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected Component getLink(String id) {
  PageParameters pageParameters = new PageParameters();
  pageParameters.put("topicMapId", getTopicMapId());
  pageParameters.put("topicId", getTopicId());
  
  return new BookmarkablePageLink<Page>(id, VizigatorPage.class, pageParameters) {
    @Override
    protected void onComponentTag(ComponentTag tag) {
      tag.setName("a");
      //tag.put("target", "_blank");
      super.onComponentTag(tag);
    }
    @Override
    protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
      replaceComponentTagBody(markupStream, openTag, new ResourceModel("vizigator.text2").getObject().toString());
    }
  };
}
 
開發者ID:ontopia,項目名稱:ontopia,代碼行數:20,代碼來源:VizigatorLinkFunctionBoxPanel.java

示例2: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(final ComponentTag tag) {
    /*
     * Anchors don't work with fallback, but we just ignore the exception when still needed by menu etc in
     * bootstrap. Thus this workaround.
     */
    final boolean anchor = "a".equals(tag.getName());
    if (anchor) {
        tag.setName("button");
    }
    super.onComponentTag(tag);
    if (anchor) {
        tag.setName("a");
        //if missing, add href to make cursor display properly
        if (Strings.isBlank(tag.getAttribute("href"))) {
            tag.put("href", "#");
        }
    }
}
 
開發者ID:subes,項目名稱:invesdwin-nowicket,代碼行數:20,代碼來源:ModelButton.java

示例3: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	configure();
	if (!isEnabled()) {
		tag.setName("span");
	}
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:9,代碼來源:BranchLink.java

示例4: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	
	configure();
	if (!isEnabled())
		tag.setName("span");
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:9,代碼來源:UserLink.java

示例5: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	configure();
	if (!isEnabled())
		tag.setName("span");
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:8,代碼來源:AvatarLink.java

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

示例7: onInitialize

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onInitialize() {
	super.onInitialize();
	
	ViewStateAwarePageLink<Void> avatarLink = new ViewStateAwarePageLink<Void>("avatar", 
			AvatarEditPage.class, AvatarEditPage.paramsOf(getUser())) {

		@Override
		protected void onComponentTag(ComponentTag tag) {
			super.onComponentTag(tag);
			if (!isEnabled())
				tag.setName("span");
		}
		
	};
	if (!SecurityUtils.canManage(getUser())) {
		avatarLink.setEnabled(false);
	}
	add(avatarLink);
	avatarLink.add(new Avatar("avatar", userModel.getObject()));
	
	List<PageTab> tabs = new ArrayList<>();
	
	tabs.add(new UserTab("Profile", "fa fa-fw fa-list-alt", UserProfilePage.class));
	if (SecurityUtils.canManage(getUser())) {
		tabs.add(new UserTab("Edit Avatar", "fa fa-fw fa-picture-o", AvatarEditPage.class));
		
		if (StringUtils.isNotBlank(getUser().getPassword()))
			tabs.add(new UserTab("Change Password", "fa fa-fw fa-key", PasswordEditPage.class));
		tabs.add(new UserTab("Access Token", "fa fa-fw fa-key", TokenGeneratePage.class));
	}
	tabs.add(new UserTab("Groups", "fa fa-fw fa-group", UserMembershipsPage.class));
	if (SecurityUtils.isAdministrator()) 
		tabs.add(new UserTab("Authorizations", "fa fa-fw fa-lock", UserAuthorizationsPage.class));
	if (SecurityUtils.canManage(getUser()))
		tabs.add(new UserTab("Tasks", "fa fa-fw fa-bell-o", TaskListPage.class));
	
	add(new Tabbable("userTabs", tabs));
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:40,代碼來源:UserPage.java

示例8: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(final ComponentTag tag) {
	if (!Components.hasTagName(tag, "div", "li")) {
		tag.setName("div");
	}

	super.onComponentTag(tag);

	if (dropUp.getObject()) {
		Attributes.addClass(tag, "dropup");
	}

	Attributes.addClass(tag, createCssClassName());
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:15,代碼來源:DropDownButton.java

示例9: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("input");
  tag.put("type", "text");
  tag.put("size", cols);
  super.onComponentTag(tag);
}
 
開發者ID:ontopia,項目名稱:ontopia,代碼行數:8,代碼來源:FieldInstanceTextField.java

示例10: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("textarea");
  tag.put("cols", cols);
  tag.put("rows", rows);
  super.onComponentTag(tag);
}
 
開發者ID:ontopia,項目名稱:ontopia,代碼行數:8,代碼來源:FieldInstanceTextArea.java

示例11: 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,代碼來源:ModelExternalLink.java

示例12: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(final ComponentTag tag) {
    tag.setName("div");
    tag.getAttributes().clear();
    tag.getAttributes().put("class", getRadioClass());
    super.onComponentTag(tag);
}
 
開發者ID:subes,項目名稱:invesdwin-nowicket,代碼行數:8,代碼來源:ModelRadioChoice.java

示例13: onComponentTag

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

    // rename input tag to span tag
    tag.setName("span");
    tag.remove("type");
    tag.remove("value");
    tag.remove("name");
}
 
開發者ID:alancnet,項目名稱:artifactory,代碼行數:13,代碼來源:StyledRadio.java

示例14: newLink

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@SuppressWarnings({ "rawtypes", "unchecked" })
protected ModelDownloadLink newLink(final String componentId, final IModel<File> rowModel) {
    return new ModelDownloadLink(componentId, (IModel) getDataModel(rowModel),
            element.getTitleModel((IModel) rowModel)) {
        @Override
        protected void onComponentTag(final ComponentTag tag) {
            tag.setName("a");
            super.onComponentTag(tag);
        }
    };
}
 
開發者ID:subes,項目名稱:invesdwin-nowicket,代碼行數:12,代碼來源:ModelDownloadAnchorColumn.java

示例15: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("input");
  tag.put("type", "text");
  tag.put("size", (cols != null ? cols : new ResourceModel("textfield.default.size").getObject().toString()));
  super.onComponentTag(tag);
}
 
開發者ID:ontopia,項目名稱:ontopia,代碼行數:8,代碼來源:AjaxOntopolyTextField.java


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