Re: Access to a surrounding component
Re: Access to a surrounding component
- Subject: Re: Access to a surrounding component
- From: Timo Hoepfner <email@hidden>
- Date: Tue, 28 Sep 2010 22:37:41 +0200
Hi Stefan,
consider passing the relevant vars/actions via bindings. Relying on a certain component structure will get into your way sooner or later.
That being said, WOComponent#parent() might be what you're looking for:
<http://developer.apple.com/legacy/mac/library/documentation/InternetWeb/Reference/WO542Reference/com/webobjects/appserver/WOComponent.html#parent()>
Depending on what you want to do, WOComponent#performParentAction might also be useful:
<http://developer.apple.com/legacy/mac/library/documentation/InternetWeb/Reference/WO542Reference/com/webobjects/appserver/WOComponent.html#performParentAction(java.lang.String)>
And when you don't want the actual parent, but the page level component, use WOComponent#context().page()...
<http://developer.apple.com/legacy/mac/library/documentation/InternetWeb/Reference/WO542Reference/com/webobjects/appserver/WOComponent.html#context()>
<http://developer.apple.com/legacy/mac/library/documentation/InternetWeb/Reference/WO542Reference/com/webobjects/appserver/WOContext.html#page()>
HTH,
Timo
Am 28.09.2010 um 22:24 schrieb Stefan Klein:
> Hi,
>
> is there anyway to access the surrounding component.
>
> Example :
>
> <wo: comp1>
> <wo comp2 />
> </wo>
>
> Is there anyway for comp2 to find com1 ?
>
> Stefan
> _______________________________________________
> 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
_______________________________________________
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