Example #1
0
  @AfterCompose
  public void doAfterCompose(
      @ContextParam(ContextType.VIEW) Component view,
      @ExecutionArgParam("map") Map<String, Object> parameters) {
    Selectors.wireComponents(view, this, false);
    this.view = view;
    userName = FHSessionUtil.getCurrentUser().getUserLoginID();
    listBoxViewModel = new ListboxViewModel();
    allReordsInDB = new ListModelList<>();
    getDataRecordList();
    for (Jobdetails up : allReords) {
      allReordsInDB.add(up);
    }
    // allReordsInDB.setMultiple(true);
    listBoxViewModel.setModel(allReordsInDB);

    // loadUserTabs();
    if (usertabs != null && listBoxViewModel.getModel().size() > 0) {
      if (selectedItem != null) loadDetailPageTab(selectedItem);
      else {
        selectedItem = new Jobdetails();
        loadDetailPageTab(selectedItem);
      }
    } else {
      selectedItem = new Jobdetails();
      loadDetailPageTab(selectedItem);
    }
  }
Example #2
0
 @Command
 @NotifyChange("usertabs")
 public void loadDetailPageTab() {
   if (!listBoxViewModel.getSelectedListItem().isEmpty()) {
     for (Iterator itr = listBoxViewModel.getSelectedListItem().iterator(); itr.hasNext(); ) {
       Jobdetails data = (Jobdetails) itr.next();
       loadDetailPageTab(data);
     }
   }
 }
Example #3
0
 @NotifyChange("*")
 @Command
 public void addNewJobDetail() {
   Jobdetails selectedrecord = new Jobdetails();
   if (listBoxViewModel.getModel() == null) {
     listBoxViewModel.setModel(new ListModelList<>());
   }
   listBoxViewModel.getModel().add(selectedrecord);
   listBoxViewModel.setSelectItem(selectedrecord);
   loadDetailPageTab(selectedrecord);
 }
Example #4
0
  @Command
  @NotifyChange("*")
  public void refresh() {
    getDataRecordList();
    allReordsInDB.removeAll(allReordsInDB);
    for (Jobdetails up : allReords) {
      allReordsInDB.add(up);
    }
    listBoxViewModel.setModel(allReordsInDB);

    if (usertabs != null && listBoxViewModel.getModel().size() > 0) {
      this.selectedItem = (Jobdetails) listBoxViewModel.getModel().get(0);
      loadDetailPageTab(selectedItem);
    }
  }