Thanx Timo for your detailed answer,

but that's not what I'm looking for.

Just another try:

I had a component comp1 that is embed in a page.
comp1 has other components in it and one of them is a WOComponentContent.
In that WOComponentContent i placed some other components.

What I tried is to get access to comp1 from the inner components to read some computed values from comp1.

Using parent() brings me up one level to high.

Stefan

Am 28.09.10 22:37, schrieb Timo Hoepfner:
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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/th-dev%40onlinehome.de

This email sent to [email protected]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to