@Override public IBreadCrumbParticipant getActive() { return decorated.getActive(); }
/** * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#getActive() */ public IBreadCrumbParticipant getActive() { return decorated.getActive(); }
/** * 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); }
final IBreadCrumbParticipant active = breadCrumbModel.getActive(); if (active == null)
/** * @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); }
/** * 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.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(new Change() { private static final long serialVersionUID = 1L; @Override public void undo() { breadCrumbModel.setActive(active); } }); // set the next participant as the active one breadCrumbModel.setActive(participant); }