Example usage for org.apache.wicket.markup.html.link AbstractLink remove

List of usage examples for org.apache.wicket.markup.html.link AbstractLink remove

Introduction

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

Prototype

public MarkupContainer remove(final Component component) 

Source Link

Document

Removes a component from the children identified by the component.getId()

Usage

From source file:org.geoserver.web.resources.PageResourceBrowser.java

License:Open Source License

/**
 * Enable/disable a button//from   w ww.j  ava 2 s  .  c  o m
 * 
 * @param button the button
 * @param enabled enabled state
 */
protected static void enable(AbstractLink button, boolean enabled) {
    if (enabled != button.isEnabled()) {
        button.setEnabled(enabled);
        if (enabled) {
            button.remove(DISABLED_BEHAVIOR);
        } else {
            button.add(DISABLED_BEHAVIOR);
        }
    }
}