Thursday, September 25, 2008

Define a RecordsField through UML (Archgenxml 2.1)

In Archgenxml 1.5, a field called "record" or "records" would be converted to a RecordsField. Somewhere between 1.5 and 2.1, this functionality was broken. In current agx, you may define a RecordsField as a stub in a separate stub package "fields" like so:

Set import_from=Products.ATExtensions.field.records, and make sure to add the "dependency" lines. You will probably also want the accompanying widget, see the model below. Import the widget from Products.ATExtensions.widget
There is a difference between a RecordField/RecordWidget and a RecordsField/RecordsWidget, to use a RecordField import it from Products.ATExtensions.field.records

After having done this, you may define a field of type Record(s)field, and set a tagged value widget=RecordsWidget (or RecordWidget).

No comments: