code: public static String getClearHiddenCommandFormParamsFunctionName(
              String formName)
      {
          final char separatorChar = FacesContext.getCurrentInstance().getNamingContainerSeparatorChar();
          if (formName == null)
          {
              return "'" + HtmlRendererUtils.CLEAR_HIDDEN_FIELD_FN_NAME
                      + "_'+formName.replace(/-/g, '\\$" + separatorChar
                      + "').replace(/" + separatorChar + "/g,'_')";
          }
  
          return JavascriptUtils
                  .getValidJavascriptNameAsInRI(HtmlRendererUtils.CLEAR_HIDDEN_FIELD_FN_NAME + "_"
                          + formName.replace(separatorChar, '_'));
      }
docs: Prefixes the given String with "clear_" and removes special characters
  
  @param formName
  @return String