code: public String getButtonJs(String id, String form) {
  
          StringBuffer buttonJs = new StringBuffer(8);
          buttonJs.append("javascript:openPrincipalWin('");
          buttonJs.append(OpenCms.getSystemInfo().getOpenCmsContext());
          buttonJs.append("/system/workplace/commons/principal_selection.jsp");
          buttonJs.append("','" + form + "',  '");
          buttonJs.append(id);
          buttonJs.append("', document, '");
          if (m_flags != null) {
              buttonJs.append(m_flags);
          } else {
              buttonJs.append("null");
          }
          buttonJs.append("'");
          buttonJs.append(");");
          return buttonJs.toString();
      }
docs: Returns the needed java script for the search button.<p>
  
  @param id the id of the widget to generate the search button for
  @param form the id of the form where to which the widget belongs
  
  @return javascript code