本文整理汇总了Java中org.apache.wicket.markup.parser.XmlTag类的典型用法代码示例。如果您正苦于以下问题:Java XmlTag类的具体用法?Java XmlTag怎么用?Java XmlTag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlTag类属于org.apache.wicket.markup.parser包,在下文中一共展示了XmlTag类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onComponentTag
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@Override
protected void onComponentTag(ComponentTag tag) {
if (tag.isOpenClose()) {
wasOpenCloseTag = true;
tag.setType(XmlTag.TagType.OPEN);
}
super.onComponentTag(tag);
tag.put("class", getCssClass(tag));
if ("input".equalsIgnoreCase(tag.getName())) {
tag.put("value", getTitle());
}
if (isEnabled()) {
// is a <a> or other tag
if ("a".equalsIgnoreCase(tag.getName())) {
tag.put("href", Strings.replaceAll(getURL(), "&", "&"));
}
} else {
disableLink(tag);
}
}
开发者ID:alancnet,项目名称:artifactory,代码行数:24,代码来源:BaseTitledLink.java
示例2: onComponentTag
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
if (tag.isOpenClose()) {
tag.setType(XmlTag.TagType.OPEN);
}
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:9,代码来源:AjaxIconButton.java
示例3: onComponentTag
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的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
示例4: onComponentTagBody
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@Override
public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
super.onComponentTagBody(markupStream, openTag);
// close span tag
getResponse().write(openTag.syntheticCloseTagString());
openTag.setType(XmlTag.TagType.CLOSE);
}
开发者ID:alancnet,项目名称:artifactory,代码行数:9,代码来源:StyledCheckbox.java
示例5: onComponentTag
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
/**
* @see org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
*/
@Override
protected void onComponentTag(ComponentTag tag)
{
super.onComponentTag(tag);
tag.setType(XmlTag.OPEN);
tag.put("id", getDefaultModelObjectAsString());
tag.put("name", getDefaultModelObjectAsString());
}
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:12,代码来源:Anchor.java
示例6: onComponentTag
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@Override
public void onComponentTag(Component component, ComponentTag tag) {
if (tag.getType() != XmlTag.TagType.CLOSE) {
String cssClass = tag.getAttribute("class");
String newClass = cssClass == null ? getCssClasses() : cssClass + " " + getCssClasses();
tag.put("class", newClass);
}
}
开发者ID:jkrasnay,项目名称:panelized,代码行数:9,代码来源:CellStyle.java
示例7: append_withVarargs_appendsAllClasses
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@Test
public void append_withVarargs_appendsAllClasses() throws Exception {
ComponentTag a = new ComponentTag("a", XmlTag.TagType.OPEN);
CssClassNameAppender.append(a, "foo", "bar", "foo");
List<String> classes = Arrays.asList(a.getAttribute("class").split(" "));
assertEquals(2, classes.size());
assertTrue("class 'foo' not set", classes.contains("foo"));
assertTrue("class 'bar' not set", classes.contains("bar"));
}
开发者ID:flex-oss,项目名称:flex-ui,代码行数:11,代码来源:CssClassNameAppenderTest.java
示例8: append_withICssClassNameProvider_appendsClassesCorrectly
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@Test
public void append_withICssClassNameProvider_appendsClassesCorrectly() throws Exception {
ComponentTag a = new ComponentTag("a", XmlTag.TagType.OPEN);
CssClassNameAppender.append(a, new CssClassNameProvider());
List<String> classes = Arrays.asList(a.getAttribute("class").split(" "));
assertEquals(2, classes.size());
assertTrue("class 'foo' not set", classes.contains("foo"));
assertTrue("class 'bar' not set", classes.contains("bar"));
}
开发者ID:flex-oss,项目名称:flex-ui,代码行数:12,代码来源:CssClassNameAppenderTest.java
示例9: append_withICssClassNameProviderModel_appendsClassesCorrectly
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void append_withICssClassNameProviderModel_appendsClassesCorrectly() throws Exception {
ComponentTag a = new ComponentTag("a", XmlTag.TagType.OPEN);
Model<CssClassNameProvider> model = new Model<>(new CssClassNameProvider());
CssClassNameAppender.append(a, model);
List<String> classes = Arrays.asList(a.getAttribute("class").split(" "));
assertEquals(2, classes.size());
assertTrue("class 'foo' not set", classes.contains("foo"));
assertTrue("class 'bar' not set", classes.contains("bar"));
}
开发者ID:flex-oss,项目名称:flex-ui,代码行数:14,代码来源:CssClassNameAppenderTest.java
示例10: onComponentTag
import org.apache.wicket.markup.parser.XmlTag; //导入依赖的package包/类
@Override
public final void onComponentTag(Component component, ComponentTag tag) {
if (tag.getType() != XmlTag.TagType.CLOSE) {
replaceAttributeValue(component, tag);
}
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:7,代码来源:UserProfilePictureBackgroundBehaviour.java
注:本文中的org.apache.wicket.markup.parser.XmlTag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论