Hi,
I have a lot of different hierarchical data ( Bill of Materials or BOM, Manifest, Revisions ...) So I wanted to write a generic Hierarchy component that would iterate through the relationships to build the hierarchy. I would then reuse this component, properly configured with keypaths and simply design new display components (BOMCell, RevisionCell, ManifestCell...) for each types of data I need to display. I assume that ERXComponentContent is the key or at least part of the solution
<wo:Hierarchy rootObject="$ro"> <wo:BOMCell /> </wo:Hierarchy>
<wo:Hierarchy rootObject="$ro"> <wo:RevisionCell /> </wo:Hierarchy>
etc.
In my Hierarchy.wo I have
<wo:loop list="$children" item= "$aChild"> <wo:ERXWOComponentContent /> </wo:loop>
Or even have it recurse down the tree...
<wo:loop list="$children" item= "$aChild"> <wo:Hierarchy rootObject="$aChild"> <wo:ERXWOComponentContent />
I imagine my BOMCell would look like
<div> [ <wo:string value="$^aChild" /> ] </div>
I've looked through similar components in Wonder and I can't seem to get it to work. My problem seems to be that my BOMCell component never gets to the node data...
I also investigated making Hierarchy a ERXDynamicComponent without success, but I suspect that too would be a clean way of doing it.
Thanks for any clues... |