docs: private final StringBuilder makeAjax(ClientBehaviorContext context, AjaxBehavior behavior)
      {
          StringBuilder retVal = SharedStringBuilder.get(context.getFacesContext(), AJAX_SB, 60);
          StringBuilder paramBuffer = SharedStringBuilder.get(context.getFacesContext(), AJAX_PARAM_SB, 20);
  
          String executes = mapToString(context, paramBuffer, AJAX_KEY_EXECUTE, behavior.getExecute());
          String render = mapToString(context, paramBuffer, AJAX_KEY_RENDER, behavior.getRender());
  
          String onError = behavior.getOnerror();
          if (onError != null && !onError.trim().equals(EMPTY))
          {
              //onError = AJAX_KEY_ONERROR + COLON + onError;
              paramBuffer.setLength(0);
              paramBuffer.append(AJAX_KEY_ONERROR);
              paramBuffer.append(COLON);
              paramBuffer.append(onError);
              onError = paramBuffer.toString();
          }
          else
          {
              onError = null;
          }
          String onEvent = behavior.getOnevent();
          if (onEvent != null && !onEvent.trim().equals(EMPTY))
          {
              paramBuffer.setLength(0);
              paramBuffer.append(AJAX_KEY_ONEVENT);
              paramBuffer.append(COLON);
              paramBuffer.append(onEvent);
              onEvent = paramBuffer.toString();
          }
          else
          {
              onEvent = null;
          }
          /*
           * since version 2.2
           */
          String delay = behavior.getDelay();
          if (delay != null && !delay.trim().equals(EMPTY))
          {
              paramBuffer.setLength(0);
              paramBuffer.append(AJAX_KEY_DELAY);
              paramBuffer.append(COLON);
              //RTC 168751 / JIRA MYFACES-3974
              if ("none".equals(delay))
              {
                  paramBuffer.append('\'');
                  paramBuffer.append(delay);
                  paramBuffer.append('\'');
              }
              else
              {
                  paramBuffer.append(delay);
              }
              delay = paramBuffer.toString();
          }
          else
          {
              delay = null;
          }
          /*
           * since version 2.2
           */
          String resetValues = Boolean.toString(behavior.isResetValues());
          if (resetValues.equals("true"))
          {
              paramBuffer.setLength(0);
              paramBuffer.append(AJAX_KEY_RESETVALUES);
              paramBuffer.append(COLON);
              paramBuffer.append(resetValues);
              resetValues = paramBuffer.toString();
          }
          else
          {
              resetValues = null;
          }
  
          String sourceId = null;
          if (context.getSourceId() == null) 
          {
              sourceId = AJAX_VAL_THIS;
          }
          else
          {
              paramBuffer.setLength(0);
              paramBuffer.append('\'');
              paramBuffer.append(context.getSourceId());
              paramBuffer.append('\'');
              sourceId = paramBuffer.toString();
          }
  
  
          String event = context.getEventName();
  
          retVal.append(JS_AJAX_REQUEST);
          retVal.append(L_PAREN);
          retVal.append(sourceId);
          retVal.append(COMMA);
          retVal.append(AJAX_VAL_EVENT);
          retVal.append(COMMA);
  
          Collection<ClientBehaviorContext.Parameter> params = context.getParameters();
          int paramSize = (params != null) ? params.size() : 0;
  
          List<String> parameterList = new ArrayList<String>(paramSize + 2);
          if (executes != null)
          {
              parameterList.add(executes.toString());
          }
          if (render != null)
          {
              parameterList.add(render.toString());
          }
          if (onError != null)
          {
              parameterList.add(onError);
          }
          if (onEvent != null)
          {
              parameterList.add(onEvent);
          }
          /*
           * since version 2.2
           */
          if (delay != null)
          {
              parameterList.add(delay);
          }
          /*
           * since version 2.2
           */
          if (resetValues != null)
          {
              parameterList.add(resetValues);
          }
          if (paramSize > 0)
          {
              /**
               * see ClientBehaviorContext.html of the spec
               * the param list has to be added in the post back
               */
              // params are in 99% RamdonAccess instace created in 
              // HtmlRendererUtils.getClientBehaviorContextParameters(Map<String, String>)
              if (params instanceof RandomAccess)
              {
                  List<ClientBehaviorContext.Parameter> list = (List<ClientBehaviorContext.Parameter>) params;
                  for (int i = 0, size = list.size(); i < size; i++)
                  {
                      ClientBehaviorContext.Parameter param = list.get(i);
                      append(paramBuffer, parameterList, param);
                  }
              }
              else
              {
                  for (ClientBehaviorContext.Parameter param : params)
                  {
                      append(paramBuffer, parameterList, param);
                  }
              }
          }
  
          //parameterList.add(QUOTE + BEHAVIOR_EVENT + QUOTE + COLON + QUOTE + event + QUOTE);
          paramBuffer.setLength(0);
          paramBuffer.append(QUOTE);
          paramBuffer.append(BEHAVIOR_EVENT);
          paramBuffer.append(QUOTE);
          paramBuffer.append(COLON);
          paramBuffer.append(QUOTE);
          paramBuffer.append(event);
          paramBuffer.append(QUOTE);
          parameterList.add(paramBuffer.toString());
          
          /**
           * I assume here for now that the options are the same which also
           * can be sent via the options attribute to javax.faces.ajax
           * this still needs further clarifications but I assume so for now
           */
          retVal.append(buildOptions(paramBuffer, parameterList));
  
          retVal.append(R_PAREN);
  
          return retVal;
      }