|
From: Jeremy F. <jfi...@ma...> - 2002-11-01 00:24:16
|
"we need to come up with a consistent scheme for how to pass "extra" =
information in the descriptor"
I'd say go with the way you're doing it now - attributes of objects are =
written as xml attributes and items that are distinct objects are nodes, =
such as field and rule. If it makes a difference, attributes are =
accessed through the xmlAttributes structure and nodes are accessed =
through the xmlChildren array in CFMX.
----- Original Message -----=20
From: Nathan Dintenfass=20
To: mod...@li...=20
Sent: Thursday, October 31, 2002 6:51 PM
Subject: RE: [Modus-devs] Collections of content objects and =
performance
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 -----=20
From: Nathan Dintenfass=20
To: mod...@li...=20
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=3D"Press Release">
<fields>
<field
name=3D"title"
label=3D"Title"
type=3D"org.bacfug.modus.fields.text">
<rules>
<rule
name=3D"org.bacfug.modus.validation.full" />
<rule
name=3D"org.bacfug.modus.validation.maxlength"=20
maxlength=3D"50"/>=20
</rules>
</field>
<field
name=3D"body"
label=3D"Main Body"
type=3D"org.bacfug.modus.fields.longText"/>
<field
name=3D"image"
label=3D"Photo"
type=3D"org.bacfug.modus.fields.webImage"/>
<field
name=3D"featured"
label=3D"Featured?"=20
type=3D"org.bacfug.modus.fields.yesno"=20
default=3D"no">
<rules>
<rule
name=3D"org.bacfug.modus.validation.boolean"/>
</rules>
</field>
<field
name=3D"category"
label=3D"Category"
type=3D"modustest.contentObjects.categoryPicker"/>
<field name=3D"type"
label=3D"type"
type=3D"org.bacfug.modus.fields.picklist">
<options>
<option value=3D"normal" label=3D"Normal"/>
<option value=3D"special" label=3D"Special"/>
</options> =20
</field>
<field name=3D"related"
label=3D"Related Press Releases"
type=3D"org.bacfug.modus.fields.contentObject"
multiple=3D"yes">
<objectType name=3D"modustest.contentObjects.pressRelease"/>
</field> =20
</fields>
<contentObjectType>/modus-devs |