本文整理了Java中org.apache.wicket.markup.html.panel.Fragment.setRenderBodyOnly()
方法的一些代码示例,展示了Fragment.setRenderBodyOnly()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.setRenderBodyOnly()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.panel.Fragment
类名称:Fragment
方法名:setRenderBodyOnly
暂无
代码示例来源: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: apache/syncope
@Override
protected void onUpdate(final AjaxRequestTarget target) {
Fragment emptyFragment = new Fragment("searchPanel", "emptyFragment", Specification.this);
container.addOrReplace(emptyFragment.setRenderBodyOnly(true));
otherType.setModelObject(null);
// enable "otherType" dropdown only if "type" option is selected - SYNCOPE-1140
otherType.setEnabled(type.getModelObject() != null && !type.getModelObject().isEmpty());
target.add(otherType);
target.add(container);
}
});
代码示例来源:origin: apache/syncope
public Relationships(final AnyWrapper<?> modelObject, final PageReference pageRef) {
super();
add(new Label("title", new ResourceModel("any.relationships")));
if (modelObject instanceof UserWrapper
&& UserWrapper.class.cast(modelObject).getPreviousUserTO() != null
&& !ListUtils.isEqualList(
UserWrapper.class.cast(modelObject).getInnerObject().getRelationships(),
UserWrapper.class.cast(modelObject).getPreviousUserTO().getRelationships())) {
add(new LabelInfo("changed", StringUtils.EMPTY));
} else {
add(new Label("changed", StringUtils.EMPTY));
}
this.anyTO = modelObject.getInnerObject();
this.pageRef = pageRef;
// ------------------------
// Existing relationships
// ------------------------
add(getViewFragment().setRenderBodyOnly(true));
// ------------------------
}
代码示例来源:origin: apache/syncope
@Override
public void onEvent(final IEvent<?> event) {
if (event.getPayload() instanceof SearchClausePanel.SearchEvent) {
final AjaxRequestTarget target = SearchClausePanel.SearchEvent.class.cast(event.getPayload()).
getTarget();
final String fiql = SearchUtils.buildFIQL(anyObjectSearchPanel.getModel().getObject(),
SyncopeClient.getAnyObjectSearchConditionBuilder(anyObjectSearchPanel.getBackObjectType()));
AnyDirectoryPanel.class.cast(Specification.this.anyObjectDirectoryPanel).search(fiql, target);
} else if (event.getPayload() instanceof AnySelectionDirectoryPanel.ItemSelection) {
final AjaxRequestTarget target = AnySelectionDirectoryPanel.ItemSelection.class.cast(event.
getPayload()).getTarget();
AnyTO right = AnySelectionDirectoryPanel.ItemSelection.class.cast(event.getPayload()).getSelection();
rel.setOtherEndKey(right.getKey());
Relationships.this.addNewRelationships(rel);
Relationships.this.addOrReplace(getViewFragment().setRenderBodyOnly(true));
target.add(Relationships.this);
} else {
super.onEvent(event);
}
}
}
代码示例来源:origin: org.wicketstuff/yui
menuLink.add(label);
fragNoSubMenu.add(menuLink);
fragNoSubMenu.setRenderBodyOnly(true);
add(fragNoSubMenu);
} else {
fragWithSubMenu.setRenderBodyOnly(true);
代码示例来源:origin: apache/syncope
@Override
protected void onUpdate(final AjaxRequestTarget target) {
final AnyTypeTO anyType = otherType.getModelObject();
if (anyType == null) {
Fragment emptyFragment = new Fragment("searchPanel", "emptyFragment", Specification.this);
container.addOrReplace(emptyFragment.setRenderBodyOnly(true));
} else {
final Fragment fragment = new Fragment("searchPanel", "searchFragment", Specification.this);
container.addOrReplace(fragment.setRenderBodyOnly(true));
anyObjectSearchPanel = new AnyObjectSearchPanel.Builder(
anyType.getKey(),
new ListModel<>(new ArrayList<>())).
enableSearch(Specification.this).
build("searchPanel");
fragment.add(anyObjectSearchPanel.setRenderBodyOnly(true));
anyObjectDirectoryPanel = new AnyObjectSelectionDirectoryPanel.Builder(
anyTypeClassRestClient.list(anyType.getClasses()),
anyType.getKey(),
pageRef).
setFiql(SyncopeClient.getAnyObjectSearchConditionBuilder(anyType.getKey()).
is("key").notNullValue().query()).
setWizardInModal(true).build("searchResultPanel");
fragment.add(anyObjectDirectoryPanel.setRenderBodyOnly(true));
}
target.add(container);
}
});
代码示例来源:origin: apache/syncope
container.add(emptyFragment.setRenderBodyOnly(true));
代码示例来源:origin: org.onehippo.cms7/hippo-cms-api
@Override
protected void onBeforeRender() {
Fragment fragment;
final ResourceReference icon = getIcon();
if (icon.getExtension().equalsIgnoreCase("svg")) {
fragment = new Fragment(WICKET_ID_CONTAINER, WICKET_FRAGMENT_SVG, this);
fragment.add(new InlineSvg(WICKET_ID_SVG, icon, getExtraCssClasses()));
} else {
fragment = new Fragment (WICKET_ID_CONTAINER, WICKET_FRAGMENT_IMAGE, this);
final Image image = new CachingImage(WICKET_ID_IMAGE, icon);
image.add(CssClass.append(getExtraCssClasses()));
fragment.add(image);
if (width >= 0) {
image.add(AttributeModifier.replace("width", width));
}
if (height >= 0) {
image.add(AttributeModifier.replace("height", height));
}
}
fragment.setRenderBodyOnly(true);
addOrReplace(fragment);
super.onBeforeRender();
}
}
代码示例来源:origin: apache/syncope
add(new Fragment("actions", "emptyFragment", this).setRenderBodyOnly(true));
} else {
Fragment fragment = new Fragment("actions", "actionsFragment", this);
fragment.add(actionsPanel);
add(fragment.setRenderBodyOnly(true));
内容来源于网络,如有侵权,请联系作者删除!