docs: private static boolean getClientBehaviorScript(FacesContext facesContext,
              UIComponent uiComponent, String targetClientId, String eventName,
              Map<String, List<ClientBehavior>> clientBehaviors,
              ScriptContext target,
              Collection<ClientBehaviorContext.Parameter> params)
      {
          if (!(uiComponent instanceof ClientBehaviorHolder))
          {
              target.append(STR_EMPTY);
              return false;
          }
          boolean renderClientBehavior = clientBehaviors != null && clientBehaviors.size() > 0;
          if (!renderClientBehavior)
          {
              target.append(STR_EMPTY);
              return false;
          }
          List<ClientBehavior> attachedEventBehaviors = clientBehaviors
                  .get(eventName);
          if (attachedEventBehaviors == null
                  || attachedEventBehaviors.size() == 0)
          {
              target.append(STR_EMPTY);
              return false;
          }
          ClientBehaviorContext context = ClientBehaviorContext
                  .createClientBehaviorContext(facesContext, uiComponent,
                          eventName, targetClientId, params);
          boolean submitting = false;
          
          // List<ClientBehavior>  attachedEventBehaviors is  99% _DeltaList created in
          // 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);
              }
          }
          
          return submitting;
      }