List of usage examples for org.apache.wicket.markup.html.link AbstractLink remove
public MarkupContainer remove(final Component component)
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); } } }