Well, I have been working with the brilliant cforms for a while, but 
now I am trying to do someting that is very natural in XML, but seems 
to be a serios problem in cforms, and that is quite simply a tree 
structure

Trying to something like this is really uncomfortable.

<tree>
        <treeNode>
                <treeNodeName>I am a node</treeNodeName>
                <treeNodeChildren>
                        <treeNode>
                                <treeNodeName>I am a node</treeNodeName>
                                <treeNodeChildren>
                                        <treeNode>
                                                <treeNodeName>I am a 
node</treeNodeName>
                                                <treeNodeChildren/>
                                        </treeNode>
                                </treeNodeChildren>
                        </treeNode>
                </treeNodeChildren>
        </treeNode>
        <treeNode>
                <treeNodeName>I am a node</treeNodeName>
                <treeNodeChildren/>
        </treeNode>
</tree>

The natural thing would to define a definition like this:

<fd:form>
        <fd:widgets>
                <fd:new id="treeNode"/>
                <fd:class id="treeNode">
                        <fd:widgets>
                                <fd:struct id="treeNodeChildren">
                                        <fd:widgets>
                                                <fd:new id="treeNode"/>
                                        </fd:widgets>
                                </fd:struct>
                                <fd:field id="treeNodeName">
                                        <fd:datatype base="string"/>
                                        <fd:label>Tree Node 
Name</fd:label>
                                </fd:field>
                        </fd:widgets>
                </fd:class>
        </fd:widgets>
</fd:form>

However directing a fd:new "treeNode" within the fd:class "treeNode",
creates a recursion error. I can naturally understand that the developer
wanted to hinder an tree structure being huge in memory for no reason.

Does any one know how to do this using cforms in a reasonable way.

Thank You
Chris Bentley

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to