예제 #1
0
  private Component iciciCodeMappings() {
    java.util.List<TableDisplayInput> displayInputs = new ArrayList<TableDisplayInput>();

    displayInputs.add(new StringDisplayInput("ICICICode", "getIciciCode"));
    displayInputs.add(new StringDisplayInput("StockCode", "getStockCode"));

    List<ICICICodeMapping> list = Controller.getIciciMappings();
    PMTableModel tableModel =
        new PMTableModel(list, displayInputs, false) {
          @Override
          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return columnIndex == 1;
          }

          @Override
          public void setValueAt(Object value, int rowIndex, int columnIndex) {
            ((ICICICodeMapping) dataVOs.get(rowIndex)).setStock((StockVO) value);
          }
        };
    table = UIHelper.createTable(tableModel);
    table
        .getColumnModel()
        .getColumn(1)
        .setCellEditor(new DefaultCellEditor(UIHelper.createStockVOlistJCB()));
    return UIHelper.createScrollPane(table);
  }
예제 #2
0
 @Override
 protected Object getData(String actionCommand) {
   List<ICICICodeMapping> iciciCodeMappings = ((PMTableModel) table.getModel()).getDataVOs();
   Controller.saveOrUpdateICICICodeMappings(iciciCodeMappings);
   return null;
 }