@Override protected void onSubmit(AjaxRequestTarget target, Form form) { // one up List<IBreadCrumbParticipant> l = breadCrumbModel.allBreadCrumbParticipants(); breadCrumbModel.setActive(l.get(l.size() -2)); } }.setDefaultFormProcessing(false));
@Override public IBreadCrumbParticipant getActive() { return decorated.getActive(); }
@Override public void addListener(final IBreadCrumbModelListener listener) { decorated.addListener(listener); }
/** * Activates the provided participant, which typically has the effect of replacing this current * panel with the one provided - as the participant typically would be a {@link BreadCrumbPanel * bread crumb panel} - and updating the bread crumb model of this panel, pushing the bread * crumb for the given participant on top. * * @param participant * The participant to set as the active one */ public void activate(final IBreadCrumbParticipant participant) { // get the currently active participant final IBreadCrumbParticipant active = breadCrumbModel.getActive(); if (active == null) { throw new IllegalStateException("The model has no active bread crumb. Before using " + this + ", you have to have at least one bread crumb in the model"); } // add back button support addStateChange(); // set the bread crumb panel as the active one breadCrumbModel.setActive(participant); }
@Override public List<IBreadCrumbParticipant> allBreadCrumbParticipants() { return decorated.allBreadCrumbParticipants(); }
@Override public void setActive(final IBreadCrumbParticipant breadCrumbParticipant) { decorated.setActive(breadCrumbParticipant); }
@Override public void removeListener(final IBreadCrumbModelListener listener) { decorated.removeListener(listener); }
/** * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#allBreadCrumbParticipants() */ public List<IBreadCrumbParticipant> allBreadCrumbParticipants() { return decorated.allBreadCrumbParticipants(); }
/** * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#setActive(org.apache.wicket.extensions.breadcrumb.IBreadCrumbParticipant) */ public void setActive(IBreadCrumbParticipant breadCrumbParticipant) { decorated.setActive(breadCrumbParticipant); }
/** * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#removeListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener) */ public void removeListener(IBreadCrumbModelListener listener) { decorated.removeListener(listener); }
@Override protected void onSubmit(AjaxRequestTarget target, Form form) { // one up List<IBreadCrumbParticipant> l = breadCrumbModel.allBreadCrumbParticipants(); breadCrumbModel.setActive(l.get(l.size() -2)); } }.setDefaultFormProcessing(false));
/** * @see org.apache.wicket.markup.html.link.Link#onClick() */ @Override public void onClick() { // get the currently active particpant final IBreadCrumbParticipant active = breadCrumbModel.getActive(); if (active == null) { throw new IllegalStateException("The model has no active bread crumb. Before using " + this + ", you have to have at least one bread crumb in the model"); } // get the participant to set as active final IBreadCrumbParticipant participant = getParticipant(active.getComponent().getId()); // add back button support addStateChange(); // set the next participant as the active one breadCrumbModel.setActive(participant); }
@Override protected void onDetach() { super.onDetach(); for (IBreadCrumbParticipant crumb : decorated.allBreadCrumbParticipants()) { if (crumb instanceof Component) { ((Component)crumb).detach(); } else if (crumb instanceof IDetachable) { ((IDetachable)crumb).detach(); } } } }
@Override public void undo() { breadCrumbModel.setActive(active); } });
/** * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#getActive() */ public IBreadCrumbParticipant getActive() { return decorated.getActive(); }
/** * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#addListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener) */ public void addListener(IBreadCrumbModelListener listener) { decorated.addListener(listener); }
@Override protected void onSubmit(AjaxRequestTarget target, Form form) { // one up List<IBreadCrumbParticipant> l = breadCrumbModel.allBreadCrumbParticipants(); breadCrumbModel.setActive(l.get(l.size() -2)); } }.setDefaultFormProcessing(false));
/** * Callback for the onClick event. If ajax failed and this event was generated via a normal link * the target argument will be null * * @param target * ajax target if this linked was invoked using ajax, null otherwise */ @Override public void onClick(AjaxRequestTarget target) { // get the currently active particpant final IBreadCrumbParticipant active = breadCrumbModel.getActive(); if (active == null) { throw new IllegalStateException("The model has no active bread crumb. Before using " + this + ", you have to have at least one bread crumb in the model"); } // get the participant to set as active final IBreadCrumbParticipant participant = getParticipant(active.getComponent().getId()); // add back button support addStateChange(); // set the next participant as the active one breadCrumbModel.setActive(participant); }
/** * @see org.apache.wicket.Component#onDetach() */ @Override protected void onDetach() { super.onDetach(); for (IBreadCrumbParticipant crumb : decorated.allBreadCrumbParticipants()) { if (crumb instanceof Component) { ((Component)crumb).detach(); } else if (crumb instanceof IDetachable) { ((IDetachable)crumb).detach(); } } } }