@Override public boolean isEnabled(final Component arg0) { boolean back = true; for (final Behavior behavior : behaviors_) back = back && behavior.isEnabled(arg0); return back; }
/** * Checks whether or not an {@link IRequestListener} can be invoked on this behavior. For further * information please read the javadoc on {@link Component#canCallListener()}, * this method has the same semantics. * * WARNING: Read the javadoc of {@link Component#canCallListener()} for important * security-related information. * * @param component * component this behavior is attached to * @return {@literal true} iff the listener method can be invoked */ public boolean canCallListener(Component component) { return isEnabled(component) && component.canCallListener(); }
/** * Components are allowed to reject behavior modifiers. * * @param behavior * @return False, if the component should not apply this behavior */ protected boolean isBehaviorAccepted(final Behavior behavior) { // Ignore AttributeModifiers when FLAG_IGNORE_ATTRIBUTE_MODIFIER is set if ((behavior instanceof AttributeModifier) && (getFlag(FLAG_IGNORE_ATTRIBUTE_MODIFIER) != false)) { return false; } return behavior.isEnabled(this); }
/** * Checks whether or not an {@link IRequestListener} can be invoked on this behavior. For further * information please read the javadoc on {@link Component#canCallListener()}, * this method has the same semantics. * * WARNING: Read the javadoc of {@link Component#canCallListener()} for important * security-related information. * * @param component * component this behavior is attached to * @return {@literal true} iff the listener method can be invoked */ public boolean canCallListener(Component component) { return isEnabled(component) && component.canCallListener(); }
/** * Components are allowed to reject behavior modifiers. * * @param behavior * @return False, if the component should not apply this behavior */ protected boolean isBehaviorAccepted(final Behavior behavior) { // Ignore AttributeModifiers when FLAG_IGNORE_ATTRIBUTE_MODIFIER is set if ((behavior instanceof AttributeModifier) && (getFlag(FLAG_IGNORE_ATTRIBUTE_MODIFIER) != false)) { return false; } return behavior.isEnabled(this); }
for (Behavior behavior : getBehaviors()) if (behavior instanceof IAjaxRegionMarkupIdProvider && behavior.isEnabled(this))
for (Behavior behavior : getBehaviors()) if (behavior instanceof IAjaxRegionMarkupIdProvider && behavior.isEnabled(this))
if (behavior.isEnabled(this))
if (behavior.isEnabled(this))