// javax.faces.component.UIComponentBase.addClientBehavior
if (attachedEventBehaviors instanceof RandomAccess)
{
for (int i = 0, size = attachedEventBehaviors.size(); i < size; i++)
{
ClientBehavior clientBehavior = attachedEventBehaviors.get(i);
submitting = _appendClientBehaviourScript(target, context,
submitting, i < (size -1), clientBehavior);
}
}
else
{
Iterator<ClientBehavior> clientIterator = attachedEventBehaviors.iterator();
while (clientIterator.hasNext())
{
ClientBehavior clientBehavior = clientIterator.next();
submitting = _appendClientBehaviourScript(target, context, submitting,
clientIterator.hasNext(), clientBehavior);
}
}