code: private String renderNameAndId(HttpServletRequest request, String id)
      {
          // if id is not set then we need to exit
          if (id == null)
              return null;
  
          // Legacy Java Script support -- This writes out a single table with both the id and names
          // mixed.  This is legacy support to match the pre beehive behavior.
          String idScript = null;
          IScriptReporter scriptReporter = getScriptReporter();
          ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
          if (TagConfig.isLegacyJavaScript()) {
              idScript = srs.mapLegacyTagId(scriptReporter, id, _state.id);
          }
  
          // map the tagId to the real id
          if (TagConfig.isDefaultJavaScript()) {
              String script = srs.mapTagId(scriptReporter, id, _state.id, _state.name);
  
              // if we wrote out script in legacy mode, we need to make sure we preserve it.
              if (idScript != null) {
                  idScript = idScript + script;
              }
              else {
                  idScript = script;
              }
          }
          return idScript;
      }
docs: This mehtod will render the JavaScript associated with the id lookup if id has
  been set.
  @param request
  @param id
  @return