예제 #1
0
파일: AddSitePage.java 프로젝트: IQSS/dvn
  /**
   * Changes for build 16 to support scholar dataverses and display
   *
   * @author wbossons
   */
  private List<SelectItem> loadNetworkSelectItems() {
    List selectItems = new ArrayList<SelectItem>();
    List<VDCNetwork> networkList = vdcNetworkService.getVDCSubNetworks();

    if (networkList.size() > 0) {
      selectItems.add(new SelectItem(0, "<None>"));
      for (VDCNetwork vdcNetwork : networkList) {
        selectItems.add(new SelectItem(vdcNetwork.getId(), vdcNetwork.getName()));
      }
    }
    return selectItems;
  }
예제 #2
0
파일: AddSitePage.java 프로젝트: IQSS/dvn
  /**
   * Automatically managed component initialization. <strong>WARNING:</strong> This method is
   * automatically generated, so any user-specified code inserted here is subject to being replaced.
   */
  public void init() {
    super.init();
    HttpServletRequest request =
        (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
    Iterator iterator = request.getParameterMap().keySet().iterator();
    while (iterator.hasNext()) {
      Object key = (Object) iterator.next();
      if (key instanceof String
          && ((String) key).indexOf("dataverseType") != -1
          && !request.getParameter((String) key).equals("")) {
        this.setDataverseType(request.getParameter((String) key));
      }
    }
    // check to see if a dataverse type is in request
    VDCNetwork checkForSubnetwork = getVDCRequestBean().getCurrentVdcNetwork();
    if (!checkForSubnetwork.equals(vdcNetworkService.findRootNetwork())) {
      selectSubNetworkId = checkForSubnetwork.getId();
    } else {

      selectSubNetworkId = new Long(0);
    }
    networkSelectItems = loadNetworkSelectItems();
  }