• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How does ERXComponentContent get access to the parent component...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does ERXComponentContent get access to the parent component...


  • Subject: Re: How does ERXComponentContent get access to the parent component...
  • From: Ramsey Gurley <email@hidden>
  • Date: Tue, 13 Nov 2012 08:38:36 -0700

D2W?

On Oct 6, 2012, at 10:43 PM, Louis Demers wrote:

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 />
</ wo:Hierarchy>
</wo:loop>


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...


Louis Demers eng.
www.obzerv.com

Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: How does ERXComponentContent get access to the parent component...
  • Next by Date: D2W - How to turn of batching in EmbeddedLists
  • Previous by thread: Re: How does ERXComponentContent get access to the parent component...
  • Next by thread: D2W - How to turn of batching in EmbeddedLists
  • Index(es):
    • Date
    • Thread