Hi,

I am working on creating a code generator that will create a set of
scaffolding for use with Fusebox5.

Not wanting to do everything myself I decided to use reactor to make the
database access CFCs.

Now I need some place to save some metadata about the pages being generated.
There is a big overlap with the metadata stored by reactor so I was
wondering what the consequences would be if I simply added my new metadata
to that already in the reactor config XML.

For example my reactor config file which currently contains:

....
<object name="Site">
        <hasMany name="Fuseaction">
                <relate from="SiteId" to="Site_Id"/>
        </hasMany>
        <field alias="RootDir" name="SiteRootDirectory"/>
        <field alias="ImagePath" name="SiteImagePath"/>
        <field alias="AttachmentPath" name="SiteAttachmentPath" />
</object>
....

would be updated to include the extra information which would specify
defaults for:

label           The display version of the field name.
sort            The default sort sequence for the table.
showOnList      A boolean that says if the field should be displayed in the list
page.
showOnForm      A boolean that says if the field should be included in the edit
form page.
required        A boolean that says if the field is required. (Means something
slightly different to nullable).
formType        The form control that is used in the edit form.
displaylen      The length of the displayed form field.
format  The formatting that should be applied when displaying the field (eg
LSCurrencyFormat)

The result would be something like this:

....
<object name="Site">
        <hasMany name="Fuseaction">
                <relate from="SiteId" to="Site_Id"/>
        </hasMany>
        <field alias="SiteId" name="SiteId" label="Site Id" required="true"
formType="text" displaylen="20" />
        <field alias="Name" name="Name" label="Site Name" required="true"
formType="text" displaylen="30" />
        <field alias="Description" name="Description" label="Description"
required="true" formType="textarea" />

        <field alias="RootDir" name="SiteRootDirectory" label="Site Root 
Directory"
required="true" formType="text" displaylen="50" />
        <field alias="ImagePath" name="SiteImagePath" required="true"
formType="text" displaylen="50" />
        <field alias="AttachmentPath" name="SiteAttachmentPath" required="true"
formType="text" displaylen="50" />
</object>
....

I am interested in knowing what the list members think about this idea. I
have a suspicion that it might be the wrong thing to do but the alternative
would mean another XML file with almost exactly the same information in it.

Kevin Roche
Objective Internet Limited

01256 338 490



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to