Пример #1
0
  // <editor-fold defaultstate="collapsed" desc="Load de Pantalla" >
  @PostConstruct
  public void initForm() {

    if (AdminEJBService == null) {
      AdminEJBService = new AdminEJBClient();
    }

    if (inventoryEJB == null) {
      inventoryEJB = new InventoryEJBClient();
    }

    if (AccountingEJBClient == null) {
      AccountingEJBClient = new AccountingEJBClient();
    }
    // llenar los almacenes en combobox
    String var = null;
    try {
      this.setListaAlmacenes((List<BranchTO>) AdminEJBService.getBranch(var, var));

    } catch (Exception e) {
      faceMessage(e.getMessage() + " -" + e.getCause());
      System.out.println(e.getMessage() + " -" + e.getCause());
    }

    // estado por defecto
    estateGuardar();
  }
Пример #2
0
 // <editor-fold defaultstate="collapsed" desc="Evento al seleccionar del ComboBox de almacenes" >
 public void stateChangeListener(ValueChangeEvent event) {
   System.out.print(event.getNewValue().toString());
   if (event.getNewValue() != almDest) {
     try {
       List _result = null;
       String var = null;
       _result = AdminEJBService.getBranch(event.getNewValue().toString(), var);
       Iterator<BranchTO> iterator = _result.iterator();
       BranchTO articulo = (BranchTO) iterator.next();
       nomAlmacen = articulo.getWhsname();
     } catch (Exception ex) {
       Logger.getLogger(GoodsIssuesBean.class.getName()).log(Level.SEVERE, null, ex);
     }
   }
 }