예제 #1
0
 @Override
 public void addListArticlePfListBox(
     List<ArticlePf> articlePfList, boolean isStock, boolean isResp) {
   if (isResp) {
     addArticleGroupValue(MESSAGES.fournisseur_resp_produit(), articlePfList);
   } else {
     if (isStock) {
       if (!isOutStockArticlePfListFill) {
         stockArticlePfList.addAll(articlePfList);
         isStockArticlePfListFill = true;
       } else {
         addArticleGroupValue(MESSAGES.stock_stock(), articlePfList);
         addArticleGroupValue(MESSAGES.stock_horsstock(), outStockArticlePfList);
         clearArticleLists();
       }
     } else {
       if (!isStockArticlePfListFill) {
         outStockArticlePfList.addAll(articlePfList);
         isOutStockArticlePfListFill = true;
       } else {
         addArticleGroupValue(MESSAGES.stock_stock(), stockArticlePfList);
         addArticleGroupValue(MESSAGES.stock_horsstock(), articlePfList);
         clearArticleLists();
       }
     }
   }
   articlePfValueListBox.setIndex(0);
   if (!articlePfList.isEmpty()) {
     lastArticleChoice = articlePfList.get(0);
     presenter.setParamSessionArticlePf(articlePfList.get(0));
   }
 }
예제 #2
0
  @Override
  public void addListPlatformListBox(
      List<Platform> platformList, boolean isPlatformView, boolean isStock) {
    platformValueListBox.setVisible(true);
    if (isPlatformView) {
      addPlatformGroupValue(MESSAGES.group_element_platform(), platformList);

    } else {
      if (isStock) {
        if (!isOutStockPlatformListFill) {
          stockPlatformList.addAll(platformList);
          isStockPlatformListFill = true;
        } else {
          addPlatformGroupValue(MESSAGES.stock_stock(), platformList);
          addPlatformGroupValue(MESSAGES.stock_horsstock(), outStockPlatformList);
          clearPlatformLists();
        }
      } else {
        if (!isStockPlatformListFill) {
          outStockPlatformList.addAll(platformList);
          isOutStockPlatformListFill = true;
        } else {
          addPlatformGroupValue(MESSAGES.stock_stock(), stockPlatformList);
          addPlatformGroupValue(MESSAGES.stock_horsstock(), platformList);
          clearPlatformLists();
        }
      }
    }
    platformValueListBox.setIndex(0);
    if (!platformList.isEmpty()) {
      lastPlatformChoice = platformList.get(0);
    }
  }