本文整理了Java中org.apache.wicket.markup.html.panel.Fragment.addOrReplace()
方法的一些代码示例,展示了Fragment.addOrReplace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.addOrReplace()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.panel.Fragment
类名称:Fragment
方法名:addOrReplace
暂无
代码示例来源:origin: apache/syncope
/**
* Add or replace object inside the main container.
*
* @param childs components to be added.
* @return the current panel instance.
*/
public MarkupContainer addOrReplaceInnerObject(final Component... childs) {
return initialFragment.addOrReplace(childs);
}
代码示例来源:origin: apache/syncope
private Fragment getPlusFragment(final IModel<List<INNER>> model, final String label) {
final IndicatorAjaxSubmitLink plus = new IndicatorAjaxSubmitLink("add") {
private static final long serialVersionUID = -7978723352517770644L;
@Override
protected void onSubmit(final AjaxRequestTarget target) {
//Add current component
model.getObject().add(newModelObject());
if (model.getObject().size() == 1) {
form.addOrReplace(getDataFragment());
}
target.add(container);
}
@Override
protected void onError(final AjaxRequestTarget target) {
SyncopeConsoleSession.get().error(getString(Constants.OPERATION_ERROR));
super.onError(target);
((BasePage) getPage()).getNotificationPanel().refresh(target);
}
};
final Fragment fragment = new Fragment("panelPlus", "fragmentPlus", AbstractMultiPanel.this);
fragment.addOrReplace(plus);
fragment.setRenderBodyOnly(true);
return fragment;
}
代码示例来源:origin: org.onehippo.cms7/hippo-addon-channel-manager-frontend
@Override
public MarkupContainer getContent() {
Fragment fragment = new Fragment("content", "actions", ChannelActionsPlugin.this);
try {
Node node = model.getNode();
String handleUuid = node.getIdentifier();
fragment.add(createMenu(handleUuid));
} catch (RepositoryException e) {
log.warn("Unable to create channel menu", e);
fragment.addOrReplace(new EmptyPanel("channels"));
}
ChannelActionsPlugin.this.addOrReplace(fragment);
return fragment;
}
});
代码示例来源:origin: apache/syncope
initialFragment.addOrReplace(addAjaxLink);
initialFragment.addOrReplace(exitAjaxLink);
内容来源于网络,如有侵权,请联系作者删除!