Example usage for org.apache.wicket.markup.html.link Link getId

List of usage examples for org.apache.wicket.markup.html.link Link getId

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.link Link getId.

Prototype

@Override
public String getId() 

Source Link

Document

Gets the id of this component.

Usage

From source file:org.sakaiproject.wicket.markup.html.repeater.data.toolbar.NavIntraToolbar.java

License:Educational Community License

private void addLink(Link link, RepeatingView container) {
    if (link == null) {
        throw new IllegalArgumentException("argument [link] cannot be null");
    }/*from   w w  w.  j  av  a  2  s . c o  m*/

    if (!link.getId().equals("link")) {
        throw new IllegalArgumentException("Link must have component id equal to 'link'");
    }

    link.setRenderBodyOnly(true);

    // create a container item for the toolbar (required by repeating view)
    WebMarkupContainer item = new WebMarkupContainer(container.newChildId());
    item.setRenderBodyOnly(true);
    item.add(link);

    container.add(item);
}