Пример #1
0
 public String destroy() {
   current = (Tipocomitente) getItems().getRowData();
   selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
   performDestroy();
   recreatePagination();
   recreateModel();
   return "List";
 }
Пример #2
0
 private void updateCurrentItem() {
   int count = getFacade().count();
   if (selectedItemIndex >= count) {
     // selected index cannot be bigger than number of items:
     selectedItemIndex = count - 1;
     // go to previous page if last page disappeared:
     if (pagination.getPageFirstItem() >= count) {
       pagination.previousPage();
     }
   }
   if (selectedItemIndex >= 0) {
     current = getFacade().findRange(new int[] {selectedItemIndex, selectedItemIndex + 1}).get(0);
   }
 }
Пример #3
0
 public String prepareEdit() {
   current = (Tipocomitente) getItems().getRowData();
   selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
   return "Edit";
 }
Пример #4
0
 public String prepareEdit() {
   current = (Rendicionexterna) getItems().getRowData();
   selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex();
   return "Edit";
 }