Example #1
0
 @AfterCompose
 public void init(@SelectorParam("#l14") Label l4, @SelectorParam("label") List<Label> labels) {
   for (int i = 0; i < labels.size(); i++) {
     labels.get(i).setValue("Init " + i);
   }
   l4.setValue(l4.getValue() + ":4");
 }
  void modifierCompte() {
    try {
      Compte compte = compteManager.get(Long.parseLong(idCompte.getValue()));
      compte.setNom(nom.getValue());
      compte.setSolde(solde.getValue().floatValue());
      compte.setSoldeReel(soldeReel.getValue().floatValue());
      compte.setSoldePrevisionnel(soldePrevisionnel.getValue().floatValue());

      compteManager.update(compte);

      for (Object object :
          self.getDesktop()
              .getPage("mainPage")
              .getFellow("contentNiv2")
              .getFellow("contentNiv3")
              .getFellows()) {
        System.out.println("fellow : " + object.toString() + " - " + object.getClass().getName());
      }
      List<Compte> listCompte = compteManager.getAll();
      ListModelList listModelList = new ListModelList();
      listModelList.addAll(listCompte);

      ((Listbox)
              self.getDesktop()
                  .getPage("mainPage")
                  .getFellow("contentNiv2")
                  .getFellow("contentNiv3")
                  .getFellow("main")
                  .getFellow("list"))
          .setModel(listModelList);
      win.detach();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Example #3
0
 @NotifyChange("*")
 @Command
 public void cmd1(
     @SelectorParam("label") LinkedList<Label> labels, @SelectorParam("#l13") Label l3) {
   for (int i = 0; i < labels.size(); i++) {
     labels.get(i).setValue("Command " + i);
   }
   l3.setValue(l3.getValue() + ":3");
 }
Example #4
0
 public void onRowComboChange() {
   Label l = (Label) page.getFellow("msg");
   l.setValue(l.getValue() + " on row combo change in generic forward composer");
 }