• 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 Component Tricks...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reusable Component Tricks...


  • Subject: Re: Reusable Component Tricks...
  • From: LD <email@hidden>
  • Date: Wed, 3 Aug 2005 09:30:26 +1000

Hi there,

On 03/08/2005, at 3:27 AM, David Koski wrote:

On Aug 1, 2005, at 10:31 PM, LD wrote:

I've just been having a look through the developer examples for Reusable components here...
/Developer/Examples/JavaWebObjects/Frameworks/WOComponentElements


... and I'm just trying to understand a couple of things. e.g.,
In EXHyperlink you've got:
--WXHyperlink.html--
<WEBOBJECT NAME=HyperlinkContainer><WEBOBJECT NAME=String></ WEBOBJECT><WEBOBJECT NAME=Content></WEBOBJECT></WEBOBJECT>


--WXHyperlink.wod--
Content: WOComponentContent {}

HyperlinkContainer: WOGenericContainer {
    elementName = "a";
    invokeAction = invokeAction;
    href = context.componentActionURL;
}

String: WOString {
    value = ^string;
}
<...>
What's the deal, however, with having both the WOString and WOComponentContent as child elements? And where exactly is the ^string pulling its info from? I understand that the caret symbol is analogous to a call to super but WOGenericContainer doesn't have a 'string' binding nor does WOComponent...

This allows you to do a few different things:

<WEBOBJECT NAME=HYPER1></WEBOBJECT>

<WEBOBJECT NAME=HYPER2>this is a string</WEBOBJECT>

<WEBOBJECT NAME=HYPER3>second string</WEBOBJECT>

HYPER1 : EXHyperlink {
    string = "first string";
}

HYPER2 : EXHyperlink {
}

HYPER3 : EXHyperlink {
    string = "first string";
}

Right - so the 'string' binding is an inbuilt feature then. Are there any other [undocumented - unless I've been looking in the wrong place] bindings that are of use with reusable/dynamic components?


But why is there also a WOComponentContent within the outer WOGenericContainer? i.e., when placing such a reusable component within a component for re-use, how does _both_ of the WOComponentContent and WOString get used?

As for other tricks, I'll need to spend some time looking through Chapters 6-7 of Practical WebObjects, but in the mean time - how do others take advantage of WOGenericContainer and co

You might use it for things like <TR> and <TD>'s that you want to have dynamic pieces to:
<...>
Hope this helps,

Yep, cheers.

with regards,
--

LD


_______________________________________________ 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
  • Follow-Ups:
    • Re: Reusable Component Tricks...
      • From: David Koski <email@hidden>
References: 
 >Reusable Component Tricks... (From: LD <email@hidden>)
 >Re: Reusable Component Tricks... (From: David Koski <email@hidden>)

  • Prev by Date: Re: setNumberOfObjects in an NSArray
  • Next by Date: Re: setNumberOfObjects in an NSArray
  • Previous by thread: Re: Reusable Component Tricks...
  • Next by thread: Re: Reusable Component Tricks...
  • Index(es):
    • Date
    • Thread