• 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: Reusable Components [solved & summarised]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reusable Components [solved & summarised]


  • Subject: Re: Reusable Components [solved & summarised]
  • From: Andrew Lindesay <email@hidden>
  • Date: Mon, 20 Oct 2003 20:02:33 +1300

Hello Ray;

progress and I am feeling quite pleased with my new knowledge.
The thing I am wanting to do now (aren't I ever satisfied?) is to

The bindings from your reusable components will be "automatically" taken up during the request-response cycle. As a trivial example, if your domain model had Park and Fountain, you might like to have a component to "show the fountain" as well as another page component to "show the park" -- so users can see the park and it's fountains.


So you would create an API binding out of your FountainComponent to say which fountain you wanted to show as the component outputs. On your ParkComponent, you might have a repetition of fountains. The "item" binding of the repetation of fountains would be bound to a Fountain instance variable in your component controller eg: aFountain. Your reusable FountainComponent would be bound to aFountain in the page component as well (using WOBuilder). As the ParkComponent is generated as output, the repetition loops through and on each loop, your reusable FountainComponent is run numerous times, each time with a new binding value pushed in and hence a new fountain display is output.

In this case, there is no need to undertake additional fetches in the sub component. EOF will "fault" those objects as you need them as it knows about the relationship between Parks and Fountains.

The whole thing is a stunningly well thought out piece of architecture.

cheers.

___
Andrew Lindesay
http://www.lindesay.co.nz/
+64 21 47 0929
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: LONG column problem?
  • Next by Date: Re: Newbie Questions
  • Previous by thread: Re: Reusable Components [solved & summarised]
  • Next by thread: Re: Reusable Components - one last question
  • Index(es):
    • Date
    • Thread