List of usage examples for org.apache.wicket.extensions.breadcrumb IBreadCrumbParticipant getComponent
Component getComponent();
From source file:net.tirasa.hct.editor.widgets.AjaxBreadCrumbLink.java
License:Apache License
@Override public void onClick(final AjaxRequestTarget target) { 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"); }/*from w w w. jav a2s . c o m*/ final IBreadCrumbParticipant participant = getParticipant(active.getComponent().getId(), siteName); addStateChange(new Change() { private static final long serialVersionUID = 1648663648488911430L; @Override public void undo() { breadCrumbModel.setActive(active); } }); breadCrumbModel.setActive(participant); }
From source file:org.hippoecm.frontend.plugins.standards.panelperspective.breadcrumb.PanelPluginBreadCrumbLink.java
License:Apache License
/** * Callback for the onClick event. If ajax failed and this event was generated via a normal link * the target argument will be null/* w w w . j a v a 2s . c o m*/ * * @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); }
From source file:org.hippoecm.frontend.plugins.standards.panelperspective.breadcrumb.PanelPluginBreadCrumbPanel.java
License:Apache License
protected void activateParentAndDisplayInfo(final String infoMsg) { final IBreadCrumbParticipant parentBreadcrumb = activateParent(); parentBreadcrumb.getComponent().info(infoMsg); }