code: protected String generateJavascriptTemplateContent(final Map<String, Object> variables,
  		final String methodName)
  	{
  		final StringBuilder sb = new StringBuilder();
  
  		if (isWithDocumentReadyFunction())
  		{
  			sb.append(DOCUMENT_READY_FUNCTION_PREFIX).append("\n");
  		}
  		if (isWithComponentId())
  		{
  			sb.append("$('#${").append(COMPONENT_ID).append("}')").append(".");
  		}
  		else
  		{
  			sb.append("$.");
  		}
  		sb.append(methodName).append("(");
  		if (isWithComponentId())
  		{
  			if (1 < variables.size())
  			{
  				generateJsOptionsForTemplateContent(variables, sb);
  			}
  		}
  		else
  		{
  			if (0 < variables.size())
  			{
  				generateJsOptionsForTemplateContent(variables, sb);
  			}
  		}
  		sb.append(");").append("\n");
  		if (isWithDocumentReadyFunction())
  		{
  			sb.append(DOCUMENT_READY_FUNCTION_SUFFIX);
  		}
  		return sb.toString();
  	}
docs: Generates the javascript template code from the given map and the given method name that will
  be used to interpolate with the values of the given map.
  
  @param variables
  the map with the javascript options.
  @param methodName
  The method name.
  @return The generated javascript from the given map and the given method name.