本文整理了Java中org.apache.wicket.markup.html.basic.Label.onInitialize()
方法的一些代码示例,展示了Label.onInitialize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.onInitialize()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.basic.Label
类名称:Label
方法名:onInitialize
暂无
代码示例来源:origin: org.apache.wicket/wicket-examples-jar
@Override
protected void onInitialize()
{
super.onInitialize();
setEscapeModelStrings(false);
}
代码示例来源:origin: org.opensingular/form-wicket
@Override
protected void onInitialize() {
super.onInitialize();
if (forAttrValue != null) {
add($b.attr("for", forAttrValue.getObject()));
}
}
代码示例来源:origin: org.opensingular/singular-form-wicket
@Override
protected void onInitialize() {
super.onInitialize();
if (forAttrValue != null) {
add($b.attr("for", forAttrValue.getObject()));
}
}
代码示例来源:origin: org.wicketstuff/quickview
@Override
protected void onInitialize() {
super.onInitialize();
add(newOnClickBehavior());
}
代码示例来源:origin: theonedev/onedev
@Override
protected void onInitialize() {
super.onInitialize();
add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return "label label-" + (milestoneModel.getObject().isClosed()? "success": "warning");
}
}));
}
代码示例来源:origin: vineetsemwal/quickview
@Override
protected void onInitialize() {
super.onInitialize();
add(newOnClickBehavior());
}
代码示例来源:origin: com.googlecode.wicket-jquery-ui/wicket-jquery-ui-calendar
@Override
protected void onInitialize()
{
super.onInitialize();
this.add(JQueryWidget.newWidgetBehavior(this));
}
代码示例来源:origin: sebfz1/wicket-jquery-ui
@Override
protected void onInitialize()
{
super.onInitialize();
this.add(JQueryWidget.newWidgetBehavior(this));
// shortcut for:
// this.add(this.newWidgetBehavior("#" + this.setOutputMarkupId(true).getMarkupId()));
}
代码示例来源:origin: sebfz1/wicket-jquery-ui
@Override
protected void onInitialize()
{
super.onInitialize();
this.add(JQueryWidget.newWidgetBehavior(this));
}
代码示例来源:origin: theonedev/onedev
@Override
protected void onInitialize() {
super.onInitialize();
Milestone milestone = milestoneModel.getObject();
if (!milestone.isClosed() && milestone.getDueDate().before(new Date()))
add(AttributeAppender.append("style", "color: red;"));
}
代码示例来源:origin: theonedev/onedev
@Override
protected void onInitialize() {
super.onInitialize();
add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
PullRequest request = getPullRequest();
CloseInfo closeInfo = request.getCloseInfo();
if (closeInfo == null)
return "label label-warning request-status";
else if (closeInfo.getStatus() == CloseInfo.Status.MERGED)
return "label label-success request-status";
else
return "label label-danger request-status";
}
}));
}
代码示例来源:origin: theonedev/onedev
@Override
protected void onInitialize() {
super.onInitialize();
add(new WebSocketObserver() {
@Override
public void onObservableChanged(IPartialPageRequestHandler handler, String observable) {
handler.add(component);
}
@Override
public void onConnectionOpened(IPartialPageRequestHandler handler) {
}
@Override
public Collection<String> getObservables() {
return Sets.newHashSet(BoardSpec.getWebSocketObservable(getProject().getId()));
}
});
setOutputMarkupId(true);
}
代码示例来源:origin: theonedev/onedev
@Override
protected void onInitialize() {
super.onInitialize();
setOutputMarkupId(true);
add(AttributeAppender.append("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
PullRequest request = getPullRequest();
if (request.isDiscarded())
return " label-danger";
else if (request.isMerged())
return " label-success";
else
return " label-warning";
}
}));
}
代码示例来源:origin: org.opensingular/singular-wicket-utils
@Override
protected void onInitialize() {
super.onInitialize();
add($b.classAppender("control-label"));
add(newBSGridColBehavior());
add($b.attr("for", $m.get(() -> findTargetFormComponent().map(it -> it.getMarkupId()).orElse(""))));
// altera propriedade label dos componentes se com o valor desta
// label, se a primeira for null
IModel<String> labelModel = $m.get(() -> getDefaultModelObjectAsString());
add($b.onConfigure(c ->
findTargetFormComponent()
.filter(it -> it.getLabel() == null)
.ifPresent(it -> it.setLabel(labelModel))
));
}
代码示例来源:origin: org.opensingular/wicket-utils
@Override
protected void onInitialize() {
super.onInitialize();
add($b.classAppender("control-label"));
add(newBSGridColBehavior());
add($b.attr("for", $m.get(() -> findTargetFormComponent().map(it -> it.getMarkupId()).orElse(""))));
// altera propriedade label dos componentes se com o valor desta
// label, se a primeira for null
IModel<String> labelModel = $m.get(() -> getDefaultModelObjectAsString());
add($b.onConfigure(c ->
findTargetFormComponent()
.filter(it -> it.getLabel() == null)
.ifPresent(it -> it.setLabel(labelModel))
));
}
代码示例来源:origin: theonedev/onedev
@Override
protected void onInitialize() {
super.onInitialize();
Issue issue = issueModel.getObject();
StateSpec stateSpec = OneDev.getInstance(SettingManager.class).getIssueSetting().getStateSpec(issue.getState());
if (stateSpec != null) {
String fontColor = ColorUtils.isLight(stateSpec.getColor())?"black":"white";
String style = String.format("background-color: %s; color: %s;", stateSpec.getColor(), fontColor);
add(AttributeAppender.append("style", style));
add(AttributeAppender.append("title", "State"));
}
add(AttributeAppender.append("class", "issue-state label"));
}
内容来源于网络,如有侵权,请联系作者删除!