コード例 #1
0
  private void loadAllCombos() {
    HcpDisTypeCollection coll = LookupHelper.getHcpDisType(domain.getLookupService());

    // Hcp Type Filter && Hcp Select Type
    TreeNode[] rootNodes = coll.getRootNodes();
    ArrayList<?> childColl;
    HcpDisType lookupInstance = null;

    for (int i = 0; i < rootNodes.length; i++) {
      HcpDisType lk = (HcpDisType) rootNodes[i];
      form.lyrDetails().tabSelectHcpType().cmbSelectHcpType().newRow(lk, lk.getText());

      if (lk.equals(HcpDisType.THERAPY)) {
        childColl = lk.getChildInstances();
        for (int j = 0; j < childColl.size(); j++) {
          lookupInstance = (HcpDisType) childColl.get(j);
          form.lyrDetails()
              .tabTherapist()
              .cmbTherapistType()
              .newRow(lookupInstance, lookupInstance.getText());
        }
      } else if (lk.equals(HcpDisType.NURSING)) {
        childColl = lk.getChildInstances();
        for (int j = 0; j < childColl.size(); j++) {
          lookupInstance = (HcpDisType) childColl.get(j);
          form.lyrDetails()
              .tabNurse()
              .cmbNurseType()
              .newRow(lookupInstance, lookupInstance.getText());
        }
      } else if (lk.equals(HcpDisType.MEDICAL)) {
        childColl = lk.getChildInstances();
        for (int j = 0; j < childColl.size(); j++) {
          lookupInstance = (HcpDisType) childColl.get(j);
          form.lyrDetails()
              .tabMedic()
              .cmbMedicType()
              .newRow(lookupInstance, lookupInstance.getText());
        }
      } else if (lk.equals(HcpDisType.OTHER)) {
        childColl = lk.getChildInstances();
        for (int j = 0; j < childColl.size(); j++) {
          lookupInstance = (HcpDisType) childColl.get(j);
          form.lyrDetails().tabHcp().cmbHcpType().newRow(lookupInstance, lookupInstance.getText());
        }
      }
    }
  }