failMessage = "event must not be null";
notNull(failMessage, event);
// Run through all the behavior and select the LAST ADDED behavior which
// matches the event parameter.
AjaxEventBehavior ajaxEventBehavior = null;
List behaviors = component.getBehaviors();
for (Iterator iter = behaviors.iterator(); iter.hasNext();)
{
IBehavior behavior = (IBehavior)iter.next();
// AjaxEventBehavior is the one to look for
if (behavior instanceof AjaxEventBehavior)
{
AjaxEventBehavior tmp = (AjaxEventBehavior)behavior;
if (event.equals(tmp.getEvent()))
{
ajaxEventBehavior = tmp;
}
}
}