Re: Reusable Component Tricks...
Re: Reusable Component Tricks...
- Subject: Re: Reusable Component Tricks...
- From: David Koski <email@hidden>
- Date: Thu, 4 Aug 2005 09:13:38 -0700
On Aug 2, 2005, at 4:30 PM, LD wrote:
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?
Hmm, that seems like a documentation bug because I can only find it
in older docs:
http://developer.apple.com/documentation/LegacyTechnologies/
WebObjects/WebObjects_4.0/System/Documentation/Developer/WebObjects/
DeltaDoc/NewInWO4.034.html
http://developer.apple.com/documentation/LegacyTechnologies/
WebObjects/WebObjects_4.5/System/Documentation/Developer/WebObjects/
DevGuide/ReusableComponents5.html
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?
You probably wouldn't want to use both of them, but you could. This
example uses both:
<WEBOBJECT NAME=HYPER3>second string</WEBOBJECT>
HYPER3 : EXHyperlink {
string = "first string";
}
second string is the WOComponentContent and string is the WOString.
dk
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