Scout Eclipse Table field column auto increment

143 Views Asked by At

I need to do add auto incremented numbers in a table field in Scout Eclipse

table field and ItemNo column codeenter image description here:

public class ItemDetailsField extends AbstractTableField<ItemDetailsField.Table> {
public class Table extends AbstractTable {
 @Order(1000)
 public class ItemNoColumn extends AbstractLongColumn {
 @Override
 protected String getConfiguredHeaderText() {
     return TEXTS.get("ItemNo");
 }
 
 @Override
 protected int getConfiguredWidth() {
     return 100;
         }   
 } 
}
}
1

There are 1 best solutions below

0
On

Depending on your setup, you might be able to just generate and store these values in a column in your database table, and then just load them as regular integers. Your database might even support an auto-incrementing column type (e.g. PostgreSQL's SERIAL data type).