本文整理匯總了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());
}
};
}
示例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", "#");
}
}
}
示例3: onComponentTag
import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
configure();
if (!isEnabled()) {
tag.setName("span");
}
}
示例4: onComponentTag
import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
configure();
if (!isEnabled())
tag.setName("span");
}
示例5: onComponentTag
import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
configure();
if (!isEnabled())
tag.setName("span");
}
示例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);
}
示例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));
}
示例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());
}
示例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);
}
示例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);
}
示例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
}
示例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);
}
示例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");
}
示例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);
}
};
}
示例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);
}