本文整理汇总了Java中org.apache.wicket.markup.html.basic.Label.setOutputMarkupPlaceholderTag方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setOutputMarkupPlaceholderTag方法的具体用法?Java Label.setOutputMarkupPlaceholderTag怎么用?Java Label.setOutputMarkupPlaceholderTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.html.basic.Label
的用法示例。
在下文中一共展示了Label.setOutputMarkupPlaceholderTag方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initLayout
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize, String textSize) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);
if (StringUtils.isNotEmpty(labelSize)) {
labelContainer.add(AttributeAppender.prepend("class", labelSize));
}
labelContainer.add(l);
Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getString(tooltipKey);
}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour(){
@Override
public boolean isVisible() {
return tooltipKey != null;
}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
WebMarkupContainer checkWrapper = new WebMarkupContainer(ID_CHECK_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
checkWrapper.add(AttributeAppender.prepend("class", textSize));
}
add(checkWrapper);
CheckBox check = new CheckBox(ID_CHECK, getModel());
check.setLabel(label);
checkWrapper.add(check);
}
示例2: initLayout
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize,
String textSize, boolean required, int rowNumber) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);
if (StringUtils.isNotEmpty(labelSize)) {
labelContainer.add(AttributeAppender.prepend("class", labelSize));
}
labelContainer.add(l);
Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getString(tooltipKey);
}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return tooltipKey != null;
}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
textWrapper.add(AttributeAppender.prepend("class", textSize));
}
add(textWrapper);
AceEditor text = new AceEditor(ID_TEXT, getModel());
text.add(new AttributeModifier("rows", rowNumber));
text.setOutputMarkupId(true);
text.setRequired(required);
text.setLabel(label);
text.add(AttributeAppender.replace("placeholder", label));
textWrapper.add(text);
}
示例3: initLayout
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize, String textSize, final boolean required,
final boolean markAsRequired) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);
if (StringUtils.isNotEmpty(labelSize)) {
labelContainer.add(AttributeAppender.prepend("class", labelSize));
}
labelContainer.add(l);
Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getString(tooltipKey);
}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour(){
@Override
public boolean isVisible() {
return tooltipKey != null;
}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
WebMarkupContainer requiredContainer = new WebMarkupContainer(ID_REQUIRED);
requiredContainer.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return markAsRequired;
}
});
labelContainer.add(requiredContainer);
WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
textWrapper.add(AttributeAppender.prepend("class", textSize));
}
add(textWrapper);
TextField text = createText(getModel(), label, required);
text.setLabel(label);
textWrapper.add(text);
FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ContainerFeedbackMessageFilter(this));
feedback.setOutputMarkupId(true);
textWrapper.add(feedback);
}
示例4: initLayout
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize,
String textSize, boolean required, int rowNumber) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);
if (StringUtils.isNotEmpty(labelSize)) {
labelContainer.add(AttributeAppender.prepend("class", labelSize));
}
labelContainer.add(l);
Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getString(tooltipKey);
}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return tooltipKey != null;
}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
textWrapper.add(AttributeAppender.prepend("class", textSize));
}
add(textWrapper);
TextArea text = new TextArea<>(ID_TEXT, getModel());
text.add(new AttributeModifier("rows", rowNumber));
text.setOutputMarkupId(true);
text.setRequired(required);
text.setLabel(label);
text.add(AttributeAppender.replace("placeholder", label));
textWrapper.add(text);
}
示例5: initLayout
import org.apache.wicket.markup.html.basic.Label; //导入方法依赖的package包/类
private void initLayout(String localPartLabelKey, String localPartTooltipKey,
String namespaceLabelKey, String namespaceTooltipKey, boolean markLocalPartAsRequired, boolean markNamespaceAsRequired){
Label localPartLabel = new Label(ID_LOCAL_PART_LABEL, getString(localPartLabelKey));
localPartLabel.setOutputMarkupId(true);
localPartLabel.setOutputMarkupPlaceholderTag(true);
add(localPartLabel);
WebMarkupContainer localPartRequired = new WebMarkupContainer(ID_LOCAL_PART_REQUIRED);
localPartRequired.setVisible(markLocalPartAsRequired);
add(localPartRequired);
Label namespaceLabel = new Label(ID_NAMESPACE_LABEL, getString(namespaceLabelKey));
namespaceLabel.setOutputMarkupId(true);
namespaceLabel.setOutputMarkupPlaceholderTag(true);
add(namespaceLabel);
WebMarkupContainer namespaceRequired = new WebMarkupContainer(ID_NAMESPACE_REQUIRED);
namespaceRequired.setVisible(markNamespaceAsRequired);
add(namespaceRequired);
TextField localPart = new TextField<>(ID_LOCAL_PART, localpartModel);
localPart.setOutputMarkupId(true);
localPart.setOutputMarkupPlaceholderTag(true);
localPart.setRequired(isLocalPartRequired());
localPart.add(new UpdateBehavior());
add(localPart);
DropDownChoice namespace = new DropDownChoice<>(ID_NAMESPACE, namespaceModel, prepareNamespaceList());
namespace.setOutputMarkupId(true);
namespace.setOutputMarkupPlaceholderTag(true);
namespace.setNullValid(false);
namespace.setRequired(isNamespaceRequired());
namespace.add(new UpdateBehavior());
add(namespace);
Label localPartTooltip = new Label(ID_T_LOCAL_PART);
localPartTooltip.add(new AttributeAppender("data-original-title", getString(localPartTooltipKey)));
localPartTooltip.add(new InfoTooltipBehavior());
localPartTooltip.setOutputMarkupPlaceholderTag(true);
add(localPartTooltip);
Label namespaceTooltip = new Label(ID_T_NAMESPACE);
namespaceTooltip.add(new AttributeAppender("data-original-title", getString(namespaceTooltipKey)));
namespaceTooltip.add(new InfoTooltipBehavior());
namespaceTooltip.setOutputMarkupPlaceholderTag(true);
add(namespaceTooltip);
}