List of usage examples for org.apache.wicket Component isEnableAllowed
public final boolean isEnableAllowed()
From source file:org.wicketstuff.datatable_autocomplete.panel.AJAXAutoCompleteBehavior.java
License:Apache License
@Override protected final void onComponentTag(final ComponentTag tag) { // call to super intentionally ommitted. // only add the event handler when the component is enabled. Component myComponent = getComponent(); if (myComponent.isEnabled() && myComponent.isEnableAllowed()) { List<String> eventScripts = new LinkedList<String>(); eventScripts.add(getEventHandler().toString()); addAdditionalJavaScript(eventScripts); tag.put(super.getEvent(), StringUtils.join(eventScripts, ";")); }// w w w. j a v a2s .c o m }
From source file:org.wicketstuff.minis.behavior.veil.DisabledVeil.java
License:Apache License
/** * @see Behavior#isEnabled(org.apache.wicket.Component) */// www . j av a 2 s.co m @Override public boolean isEnabled(final Component component) { return super.isEnabled(component) && component.isEnabled() && component.isEnableAllowed(); }