Java Code Examples for org.apache.wicket.markup.html.WebMarkupContainer#addOrReplace()
The following examples show how to use
org.apache.wicket.markup.html.WebMarkupContainer#addOrReplace() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseWebPage.java From syncope with Apache License 2.0 | 5 votes |
public BaseWebPage(final PageParameters parameters) { super(parameters); body = new WebMarkupContainer("body"); notificationPanel = new NotificationPanel(Constants.FEEDBACK); body.addOrReplace(notificationPanel.setOutputMarkupId(true)); add(body); }
Example 2
Source File: WizardMgtPanel.java From syncope with Apache License 2.0 | 4 votes |
protected WizardMgtPanel(final String id, final boolean wizardInModal) { super(id); setOutputMarkupId(true); this.actualId = wizardInModal ? BaseModal.CONTENT_ID : WIZARD_ID; this.wizardInModal = wizardInModal; outerObjects.add(modal); container = new WebMarkupContainer("container"); container.setOutputMarkupPlaceholderTag(true).setOutputMarkupId(true); add(container); initialFragment = new Fragment("content", "default", this); container.addOrReplace(initialFragment); addAjaxLink = new AjaxLink<T>("add") { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { send(WizardMgtPanel.this, Broadcast.BREADTH, new ActionLinksTogglePanel.ActionLinkToggleCloseEventPayload(target)); send(WizardMgtPanel.this, Broadcast.EXACT, new AjaxWizard.NewItemActionEvent<>(null, target)); } }; addAjaxLink.setEnabled(false); addAjaxLink.setVisible(false); initialFragment.addOrReplace(addAjaxLink); utilityAjaxLink = new AjaxLink<T>("utility") { private static final long serialVersionUID = -7978723352517770644L; @Override public void onClick(final AjaxRequestTarget target) { send(WizardMgtPanel.this, Broadcast.EXACT, new ExitEvent(target)); } }; utilityAjaxLink.setEnabled(false); utilityAjaxLink.setVisible(false); initialFragment.addOrReplace(utilityAjaxLink); utilityIcon = new Label("utilityIcon"); utilityAjaxLink.add(utilityIcon); add(new ListView<Component>("outerObjectsRepeater", outerObjects) { private static final long serialVersionUID = -9180479401817023838L; @Override protected void populateItem(final ListItem<Component> item) { item.add(item.getModelObject()); } }); }