This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

JVx' new UIEnumCellEditor

With the next nightly build, you'll find a new cell editor in JVx. It's a technology independent implementation and it's more or less a mix between choice cell editor and linked cell editor.

A choice cell editor shows images for defined values, e.g Checkboxes instead of Y, N. You can bind a choice cell editor to one column.
A linked cell editor is more or less a combobox that shows a table with one or more columns. You can bind a linked cell editor to one column and it can set multiple columns on value selection.

The new enum cell editor has the advantages of both editors. It shows a list of values instead of the real value, e.g. Yes, No instead of Y, N. You can bind an enum cell editor to one column and it sets exactly one column.

A short example:

UIEnumCellEditor ced = new UIEnumCellEditor();
ced.setAllowedValues(new String[] {"Y", "N"});
ced.setDisplayValues(new String[] {"Yes", "No"});

book.getRowDefinition().getColumnDefinition("CHOICE").getDataType().setCellEditor(ced);

Leave a Reply

Spam protection by WP Captcha-Free