private Detail getDetails(Row row) {
     if (row.getValue() instanceof TaskQualityForm) {
         return ((Detail) row.getFirstChild());
     } else {
         return ((Detail) row.getGrid().getParent());
     }
 }
  private void removeRow(Row row) {
    try {
      if (row.getGrid().getRows() != null) {
        row.getGrid().renderAll();
        int rowIndex = row.getGrid().getRows().getChildren().indexOf(row);

        ListModelList model = (ListModelList) row.getGrid().getListModel();
        DefaultFormatMapEntries entries = (DefaultFormatMapEntries) model.get(rowIndex);
        model.remove(rowIndex);
        String rateformtname = entries.getRateFormat();
        if (rateformtname.contains("VF_")) rateformtname = rateformtname.replaceAll("VF_", "");
        rateForamatSelected.remove(rateformtname);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 private TaskQualityForm getTaskQualityFormByRow(final Row row) {
     try {
         return (TaskQualityForm) ((Row) row.getGrid().getParent()
                 .getParent()).getValue();
     } catch (Exception e) {
         return null;
     }
 }
Exemplo n.º 4
0
 public Component getComponentCollectionOwner(Component comp) {
   if (comp instanceof Row) {
     final Row row = (Row) comp;
     return row.getGrid();
   } else {
     throw new UiException("Unsupported type for RowCollectionItem: " + comp);
   }
 }
Exemplo n.º 5
0
 public void setupBindingRenderer(Component comp, DataBinder binder) {
   if (comp instanceof Row) {
     final Row row = (Row) comp;
     final Grid grid = row.getGrid();
     if (grid.getRowRenderer() == null) {
       grid.setRowRenderer(new BindingRowRenderer(row, binder));
     }
   }
 }