|
From: Nathan D. <na...@ch...> - 2002-10-31 23:49:45
|
Actually, it just creates a SELECT box of categories -- no child objects at
all. That was my first attempt at having fields drawn from discrete
options. With CFPROPERTY there was not good way to tell it what the options
were, so I built it as a one-off field just to see how onerous that would
be. It is OK, but not great. You may notice the field right after that,
called "type" -- I have not yet implemented that, but the new XML freedom
should allow for that kind of thing. Also notice that the second rule of
title has an extra attribute called maxlength (we need to come up with a
consistent scheme for how to pass "extra" information in the descriptor.
Should it always be a node, or use attributes?
-----Original Message-----
From: mod...@li...
[mailto:mod...@li...]On Behalf Of Jeremy
Firsenbaum
Sent: Thursday, October 31, 2002 3:45 PM
To: mod...@li...
Subject: Re: [Modus-devs] Collections of content objects and performance
One question about the XML below: how does categoryPicker work? Does it
define a single field with a collection of category objects, or maybe two
fields, one with a list of category names (the handles you mentioned) and
another with a list of categoryids?
----- Original Message -----
From: Nathan Dintenfass
To: mod...@li...
Sent: Thursday, October 31, 2002 5:52 PM
Subject: RE: [Modus-devs] Collections of content objects and performance
We are very much on the same track. I agree that "join" is the wrong
word in the OO context. Collection is much better. In fact, they probably
should even be arrays, they should be structs (in CF terms). I extended the
XML config I put together after my last post to toy with what it might look
like. I came up with:
<contentObjectType label="Press Release">
<fields>
<field
name="title"
label="Title"
type="org.bacfug.modus.fields.text">
<rules>
<rule
name="org.bacfug.modus.validation.full" />
<rule
name="org.bacfug.modus.validation.maxlength"
maxlength="50"/>
</rules>
</field>
<field
name="body"
label="Main Body"
type="org.bacfug.modus.fields.longText"/>
<field
name="image"
label="Photo"
type="org.bacfug.modus.fields.webImage"/>
<field
name="featured"
label="Featured?"
type="org.bacfug.modus.fields.yesno"
default="no">
<rules>
<rule
name="org.bacfug.modus.validation.boolean"/>
</rules>
</field>
<field
name="category"
label="Category"
type="modustest.contentObjects.categoryPicker"/>
<field name="type"
label="type"
type="org.bacfug.modus.fields.picklist">
<options>
<option value="normal" label="Normal"/>
<option value="special" label="Special"/>
</options>
</field>
<field name="related"
label="Related Press Releases"
type="org.bacfug.modus.fields.contentObject"
multiple="yes">
<objectType name="modustest.contentObjects.pressRelease"/>
</field>
</fields>
<contentObjectType>/modus-devs
|