• 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
How does ERXComponentContent get access to the parent component...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: How does ERXComponentContent get access to the parent component...
  • From: Louis Demers <email@hidden>
  • Date: Sun, 07 Oct 2012 01:43:36 -0400

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: Mountain Lion WO Deployment Package by WEBAPPZ
  • Next by Date: Re: Mountain Lion WO Deployment Package by WEBAPPZ
  • Previous by thread: Re: Interrupting EOF's evaluateExpression() similar to JDBC
  • Next by thread: application not seeing a plist?
  • Index(es):
    • Date
    • Thread