congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IBreadCrumbModel
Code IndexAdd Tabnine to your IDE (free)

How to use
IBreadCrumbModel
in
org.apache.wicket.extensions.breadcrumb

Best Java code snippets using org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel (Showing top 20 results out of 315)

origin: org.onehippo.cms7/hippo-cms-admin

  @Override
  protected void onSubmit(AjaxRequestTarget target, Form form) {
    // one up
    List<IBreadCrumbParticipant> l = breadCrumbModel.allBreadCrumbParticipants();
    breadCrumbModel.setActive(l.get(l.size() -2));
  }
}.setDefaultFormProcessing(false));
origin: apache/wicket

@Override
public IBreadCrumbParticipant getActive()
{
  return decorated.getActive();
}
origin: apache/wicket

@Override
public void addListener(final IBreadCrumbModelListener listener)
{
  decorated.addListener(listener);
}
origin: apache/wicket

/**
 * 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);
}
origin: apache/wicket

@Override
public List<IBreadCrumbParticipant> allBreadCrumbParticipants()
{
  return decorated.allBreadCrumbParticipants();
}
origin: apache/wicket

@Override
public void setActive(final IBreadCrumbParticipant breadCrumbParticipant)
{
  decorated.setActive(breadCrumbParticipant);
}
origin: apache/wicket

@Override
public void removeListener(final IBreadCrumbModelListener listener)
{
  decorated.removeListener(listener);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

final IBreadCrumbParticipant active = breadCrumbModel.getActive();
if (active == null)
breadCrumbModel.setActive(participant);
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#allBreadCrumbParticipants()
 */
public List<IBreadCrumbParticipant> allBreadCrumbParticipants()
{
  return decorated.allBreadCrumbParticipants();
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#setActive(org.apache.wicket.extensions.breadcrumb.IBreadCrumbParticipant)
 */
public void setActive(IBreadCrumbParticipant breadCrumbParticipant)
{
  decorated.setActive(breadCrumbParticipant);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#removeListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener)
 */
public void removeListener(IBreadCrumbModelListener listener)
{
  decorated.removeListener(listener);
}
origin: org.onehippo.cms7/hippo-cms-admin

  @Override
  protected void onSubmit(AjaxRequestTarget target, Form form) {
    // one up
    List<IBreadCrumbParticipant> l = breadCrumbModel.allBreadCrumbParticipants();
    breadCrumbModel.setActive(l.get(l.size() -2));
  }
}.setDefaultFormProcessing(false));
origin: apache/wicket

/**
 * @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);
}
origin: apache/wicket

  @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();
      }
    }
  }
}
origin: org.ops4j.pax.wicket/pax-wicket-service

  @Override
  public void undo()
  {
    breadCrumbModel.setActive(active);
  }
});
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#getActive()
 */
public IBreadCrumbParticipant getActive()
{
  return decorated.getActive();
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel#addListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener)
 */
public void addListener(IBreadCrumbModelListener listener)
{
  decorated.addListener(listener);
}
origin: org.onehippo.cms7/hippo-cms-admin

  @Override
  protected void onSubmit(AjaxRequestTarget target, Form form) {
    // one up
    List<IBreadCrumbParticipant> l = breadCrumbModel.allBreadCrumbParticipants();
    breadCrumbModel.setActive(l.get(l.size() -2));
  }
}.setDefaultFormProcessing(false));
origin: org.onehippo.cms7/hippo-cms-api

/**
 * 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);
}
origin: org.ops4j.pax.wicket/pax-wicket-service

  /**
   * @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();
      }
    }
  }
}
org.apache.wicket.extensions.breadcrumbIBreadCrumbModel

Javadoc

Bread crumbs provide a means to track certain history of client actions. Bread crumbs are typically rendered as a list of links, and are useful when users 'dig deeper' into the site structure so that they can find their way back again and have a notion of where they currently are.

Bread crumbs in the original sense just represent where people are in a site hierarchy. For example, when browsing a product site, bread crumbs could look like this:

 
Home > Products & Solutions > Hardware > Desktop Systems 
or
 
World > Europe > The Netherlands > Utrecht 
These items would be rendered as links to the corresponding site location.

Classes that implement this interface are responsible for managing such a bread crumb structure. A BreadCrumbBar regards bread crumbs as a stack. When #setActive(IBreadCrumbParticipant) that was not in the stack yet, it would add it to the stack, or when a bread crumb is activated that is already on the stack, it would roll back to the corresponding depth.

This model does not make any presumptions on how it should interact with components. Just that there is a list of IBreadCrumbParticipant, and the notion of a currently active bread crumb participant.

A IBreadCrumbParticipant is not an actual bread crumb, but rather a proxy to components that represent a certain location relative to other bread crumbs in this model, and a means to get the bread crumb title, which is typically rendered as a link label of the actual bread crumb. The actual bread crumbs are supposed to be rendered by a component that works together with this model. I choose this model as this would suit what I think is one of the nicest patterns: BreadCrumbPanel.

Most used methods

  • allBreadCrumbParticipants
    Lists the bread crumb participants in this model.
  • setActive
    Sets the IBreadCrumbParticipant as the active one. Implementations should call IBreadCrumbModelListe
  • getActive
    Gets the currently active participant, if any.
  • addListener
    Adds a bread crumb model listener.
  • removeListener
    Removes a bread crumb model listener.

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JTextField (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now