MetaData enhancement: additional fields
Are there any plans to support custom properties in MetaData? What I
mean is something similar to Action where we can store any key/value
pair. Would come handy in custom FormFactories.
Yeah, I actually ran into a use-case :
Currently I'm playing with a Form/SubForm scenario where the outer form
should contain a collection view whose selection will drive the content
of the nested form.
That can be handled nicely by a controlling DataModel which is fed by a
collection model, f.i a TabularDataModel/ListModel whatever. It's
responsibility is to wrap it into an appropriate DataModelAdapter,
create a ListSelectionModel and keep the nested DataModel's recordIndex
in synch with the selectionModel. A TableBinding will bind the field
with the TabularDataModel to the JTable and set the JTable's
rowSelectionModel to the field exposing the selectionModel.
And now comes (at last :-) the problem: the outer form tries to create
and bind a JComponent to every field, which will blow up for the field
selectionModel. Here it would be nice to have a metaData property
"ignoreInForm" which could be checked by the FormFactory.
This may lead to a related question: is it okay to store non-visual
value/metaData pairs in a DataModel? I think it should - opens up quite
a lot of possibilities for specialized DataModels: the above mentioned
controller f.i. exposes the current selection index and the rowCount, so
it's easy to implement f.i. navigating across records by listening to
these fields only without a need to know the concrete nature of the