Re: WOHyperlink in WOComponentContent wrapped by WORepetition in subcomponent
Re: WOHyperlink in WOComponentContent wrapped by WORepetition in subcomponent
- Subject: Re: WOHyperlink in WOComponentContent wrapped by WORepetition in subcomponent
- From: Kieran Kelleher <email@hidden>
- Date: Thu, 30 Jun 2005 08:12:35 -0400
Thanks LD for replying. See below....
On Jun 29, 2005, at 11:11 PM, LD wrote:
Hi there,
On 30/06/2005, at 7:21 AM, Kieran Kelleher wrote:
I have a reusable component (WKObjectTable) that generates a HTML
table displaying attributes for an array of objects. The row
repetition in this reusable component has a WOComponentContent
allowing parent components to optionally add content for each row.
Assume this is populated via an optional API binding for the
component... e.g., a dictionary of content (values) for the repetition
objects (as keys).
No, WKObjectTable has the WORepetition. The WORepetition contains the
data for an object and iterates thru the array of objects. The
WORepetition has a WOComponentContent component dropped into the
repetition aswell.
Hence when WKObjectTable is dropped into some parent, it looks like a
container object. If I put the text "ABC" in the container (now working
in a parent containing a WKObjectTable reusable component, the "ABC"
(in the parent) gets repeated by the reusable sub-component's
repetition along with the objects. When I drop a WOHyperLink into the
container (still working in the parent), that WOHyperlink gets repeated
by the sub-component's repetition even though the WOHyperlink does not
exist in the reusable WKObjectTable subcomponent. The WOHyperlinks are
not passed to the WKObjectTable subcomponent. It does not know the
WOHyperlink exists.
In a parent component, I have put a WOHyperLink as the component
content. Is it possible to have this WOHyperlink trigger a
setObject(selection) inside the reusable component's repetition just
like WORepetition normally does when it directly has a WOHyperlink
inside it? If so, any pointers on how to accomplish that cleanly?
If I understand properly, you're wanting various actions called in the
parent (the reason for passing the WOHyperLinks) but the reusable
component to also get some value (based on the selection)?
Maybe you could adjust the API for the reusable component to allow the
passing of a dictionary of content to populate the WOComponentContent
columns (with keys as the repetition objects and values as the
optional component content - as a *string*). Create the WOHyperLinks
in the reusable component bound to a particular action in the reusable
component.
Then when the action is called you've got the object in question by
default. If you need a callback feature to your parent object, maybe
you could adjust your API to be able to (optionally) assign a delegate
object and method to invoke...
Just some incomplete ideas...
You have given me some ideas. Either it is easy do get this working and
I don't get it, or it is too hacky to get this working in which case my
reusable component became too difficult to use to be regarded as a
reusable component, so I need to rethink my design. Thanks, you have
given me some ideas.
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