You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Kristian Lind <kl...@gmail.com> on 2013/08/05 23:40:39 UTC
FormTable
Hi, I am using a form table.
I want one of the columns to be
table.addColumn(new Column("id", "id"));
table.addColumn(new Column("optionType", "Options"));
Select select = new Select();
Column column = new FieldColumn("value", select);
table.addColumn(column);
But the content of the select must depend on the value chosen in
optionType.
I try to :
table.setDataProvider(new PagingDataProvider() {
...
...
});
List<ProductOptionEnt> rowList = table.getRowList();
for (ProductOptionEnt productOptionEnt : rowList) {
Option optionType = productOptionEnt.getOptionType();
List<EnumI> enums = optionType.getEnums();
Select select = new Select();
for (EnumI enumI : enums) {
select.add(enumI.name());
}
HOW TO GET THE RIGHT COLUMN AT THE RIGHT ROW AND SET THE SELECT
column.setField(select);
}
Kris