My perefrence would be:

In the buidler:

integer:
<guitype>integer</guitype>

enum:
<guitype>enum/states</guitype>

lookup:
<guitype>enum/formats</guitype>


And in a separate location (to be determined):

<guivalues id="integer" class="org.mmbase.module.corebuilders.IntegerField" />

<guivalues id="enum/states" class="org.mmbase.module.corebuilders.ResourceField" value="org.mmbase.applications.media.resources.states" />

<guivalues id="enum/formats" class="org.mmbase.module.corebuilders.LookupField" value="formats" />


These can be combined in teh buidler into:

<guitype>integer</guitype>

<guitype class="org.mmbase.module.corebuilders.ResourceField" value="org.mmbase.applications.media.resources.states" >enum/states</guitype>

<guitype class="org.mmbase.module.corebuilders.LookupField" value="formats" >enum/formats</guitype>

Note that the 'integer' guitype would use the default fieldtypeclass, determined by the field base type (INTEGER). I.o.w. we'd have several; 'base field types' (StringField, IntegerField, LongField, NodeField,etc.) which are subclasses of FieldDefs, and determined by the base types (STRING, INETGER. LONG, NODE etc)

The Dove can obtain the type info and pass it on to the editwizards, who can then automatically construct optionlists based on the info passed.

--
Pierre van Rooden
Mediapark, C 107 tel. +31 (0)35 6772815
"Never summon anything bigger than your head."


Reply via email to