public DrawerManager(String id) { super(id); add(new EmptyPanel("next").setOutputMarkupId(true)); }
private void renderNewPageWizard(boolean show, AjaxRequestTarget target) { wizardEnabled = show; if (wizardEnabled) { form.addOrReplace(newPageWizard = new NewPageWizard("wizard", getPluginContext(), getPluginConfig()) { @Override public void onCancel() { super.onCancel(); renderNewPageWizard(false, RequestCycle.get().find(AjaxRequestTarget.class)); } @Override protected void onFinish(org.hippoecm.hst.plugins.frontend.editor.domain.Component page) { AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class); renderNewPageWizard(false, target); getBean().setPage(page.getName()); if (pagePicker != null) { pagePicker.refresh(); } if (target != null) { target.add(form); } } }); } else { form.addOrReplace(new EmptyPanel("wizard").setOutputMarkupId(true)); newPageWizard = null; } if (target != null) { target.add(form); } }
form.addOrReplace(new EmptyPanel("wizard").setOutputMarkupId(true)); newPageWizard = null;
public ListItem(String id, final AbstractDrawer drawer, DrawerManager drawerManager, String css) { super(id); setOutputMarkupId(true); manager = drawerManager; item = new WebMarkupContainer("item"); if (null != css) { item.add(new AttributeAppender("class", Model.of(css), " ")); } add(item); this.drawer = drawer; item.add(drawer); add(new EmptyPanel("next").setOutputMarkupId(true)); item.add(new AjaxEventBehavior("hide-modal") { private static final long serialVersionUID = -6423164614673441582L; @Override protected void onEvent(AjaxRequestTarget target) { manager.eventPop(ListItem.this.drawer, target); } @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.setPreventDefault(true); } }); }