Binding of select in declarative UI

<v-option-group _id="type" caption=""> <option>First</option> <option>Second</option> </v-option-group> It seems that if we bind this option group to OptionGroup - values are strings. So optgrp.getValue() is either “First” or “Second”. Is it possible that binding will be automatically place indexes of items to bean and use the content of option tag as caption?


Yes, that’s how it is, the values are also used for the item IDs and you can’t have numeric indexes.

The inline notation is very limited in its usability, typically for entering just example data. Usually when using a design, you anyhow want to bind the components to a proper data source. If you really want to have the feature, you can always make an enhancement request ticket.

Ok, if you
want the numeric indexes there, you’d need to 1) extend OptionGroup, such as MyOptionGroup, 2) reimplement readDesign() so that it uses numeric indexes for item IDs, 3) define a tag prefix such as
for your class package, 4) use the

element in your design instead of


Thank you for the a direction!
I (and probably all :slight_smile: need a way to write 99% of UI code declaratively.