本文整理了Java中org.apache.wicket.markup.html.basic.Label.getDefaultModel()
方法的一些代码示例,展示了Label.getDefaultModel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getDefaultModel()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.basic.Label
类名称:Label
方法名:getDefaultModel
暂无
代码示例来源:origin: org.apache.wicket/wicket-datetime
@Override
public IModel<Date> getModel() {
return (IModel<Date>) super.getDefaultModel();
}
代码示例来源:origin: org.wicketstuff/wicketstuff-datetime-yui
@Override
public IModel<Date> getModel() {
return (IModel<Date>) super.getDefaultModel();
}
代码示例来源:origin: org.onehippo.cms7/hippo-cms-plugins
protected InputStream getContent() {
String export = (String) dump.getDefaultModel().getObject();
ByteArrayOutputStream ostream = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(ostream);
writer.print(export);
writer.flush();
return new ByteArrayInputStream(ostream.toByteArray());
}
代码示例来源:origin: org.onehippo.cms7/hippo-cms-console-frontend
protected InputStream getContent() {
String export = (String) dump.getDefaultModel().getObject();
ByteArrayOutputStream ostream = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(ostream);
writer.print(export);
writer.flush();
return new ByteArrayInputStream(ostream.toByteArray());
}
代码示例来源:origin: org.opensingular/form-wicket
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
try (PackageTextTemplate packageTextTemplate = new PackageTextTemplate(getClass(), "PortletRichTextPanel.js")) {
final Map<String, String> params = new HashMap<>();
params.put("label", (String) label.getDefaultModel().getObject());
params.put("htmlContainer", htmlContent.getMarkupId());
params.put("hiddenInput", hiddenInput.getMarkupId());
params.put("hash", hash);
params.put("html", HTML_NEW_TAB);
packageTextTemplate.interpolate(params);
response.render(JavaScriptHeaderItem.forScript(packageTextTemplate.getString(), hash));
} catch (IOException e) {
getLogger().error(e.getMessage(), e);
}
}
代码示例来源:origin: micromata/projectforge
@SuppressWarnings("unchecked")
public static void setLabel(final FormComponent<?> component, final Label label)
{
final IModel<String> labelModel = (IModel<String>) label.getDefaultModel();
if (component instanceof DatePanel) {
((DatePanel) component).getDateField().setLabel(labelModel);
} else {
component.setLabel(labelModel);
}
}
代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend
JcrNodeModel model = (JcrNodeModel) VersionPane.this.getDefaultModel();
if (model != null) {
Object currentVersionObj = versionComponent.getDefaultModel().getObject();
int currentVersion = (currentVersionObj instanceof Integer ? ((Integer) currentVersionObj).intValue() : -1);
Node modelNode = model.getNode();
代码示例来源:origin: org.wicketstuff/wicketstuff-push-core
protected void appendHTML(final AjaxRequestTarget target, final Label component,
final String html)
{
Args.notNull(target, "target");
Args.notNull(component, "component");
if (html == null)
return;
// update the component's model object for the case when the page is refreshed using F5
component.setEscapeModelStrings(false);
final IModel<?> model = component.getDefaultModel();
component.setDefaultModelObject(model == null || model.getObject() == null ? html
: model.getObject() + html);
// escape backslashes for JavaScript
final String escapedHTML = html.replaceAll("\\\\", "\");
target.appendJavaScript("" + //
"var target = document.getElementById('" + component.getMarkupId() + "');" + //
"target.innerHTML += '" + escapedHTML + "';" + //
"target.scrollTop = target.scrollHeight" //
);
}
}
代码示例来源:origin: org.wicketstuff/push-core
protected void appendHTML(final AjaxRequestTarget target, final Label component,
final String html)
{
if (html == null)
return;
// update the component's model object for the case when the page is refreshed using F5
component.setEscapeModelStrings(false);
final IModel<?> model = component.getDefaultModel();
if (model == null)
component.setDefaultModelObject(html);
else
component.setDefaultModelObject(model.toString() + html);
// escape backslashes for JavaScript
final String escapedHTML = html.replaceAll("\\\\", "\");
target.appendJavascript("" + //
"var target = document.getElementById('" + component.getMarkupId() + "');" + //
"target.innerHTML += '" + escapedHTML + "';" + //
"target.scrollTop = target.scrollHeight" //
);
}
}
代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend
private void restoreVersion() {
JcrNodeModel model = (JcrNodeModel) VersionPane.this.getDefaultModel();
if (model != null) {
Object currentVersionObject = versionComponent.getDefaultModel().getObject();
int currentVersion = (currentVersionObject instanceof Integer ? ((Integer) currentVersionObject).intValue()
: -1);
代码示例来源:origin: org.opensingular/singular-form-wicket
private void addBehaviours() {
footer.add($b.visibleIf(() -> AbstractListMapper.canAddItems(ctx)));
addButton.add(WicketUtils.$b.attr("title", addButtonLabel.getDefaultModel()));
addButton.setEscapeModelStrings(false);
}
代码示例来源:origin: org.opensingular/form-wicket
private void addBehaviours() {
footer.add($b.visibleIf(() -> AbstractListaMapper.canAddItems(ctx)));
addButton.add(WicketUtils.$b.attr("title", addButtonLabel.getDefaultModel()));
addButton.setEscapeModelStrings(false);
}
代码示例来源:origin: org.geoserver.web/gs-web-sec-core
@Override
protected void onUpdate(AjaxRequestTarget target) {
rootChoice.getModel().detach();
target.add(rootChoice);
layerAndLabel.setVisible(!globalGroupRule.getModelObject());
target.add(layerContainer);
rootLabel.getDefaultModel().detach();
target.add(rootLabel);
}
});
内容来源于网络,如有侵权,请联系作者删除!