/** * * @see org.apache.wicket.behavior.AbstractAjaxBehavior#onComponentTag(org.apache.wicket.markup.ComponentTag) */ protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); // only add the event handler when the component is enabled. if (getComponent().isEnabled()) { tag.put(event, getEventHandler()); } }
/** * * @see org.apache.wicket.behavior.AbstractAjaxBehavior#onComponentTag(org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); // only add the event handler when the component is enabled. Component myComponent = getComponent(); if (myComponent.isEnabledInHierarchy()) { tag.put(event, escapeAttribute(getEventHandler())); } }