Re: WOComponentContent Question...
Re: WOComponentContent Question...
- Subject: Re: WOComponentContent Question...
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 8 Mar 2004 11:21:34 -0600
Well, you can find your component's parent components name with:
parent().name()
Or you can find the top level component, and it's name, with:
context().page().name().
In some cases parent() and context().page() may be the same
WOComponent instance, of course.
From a design point of view, it may be better to pass this
information (what type of header to show) through a binding, instead
of guessing it from parent() or context().page() though. A looser
coupling between components, where all communication happens through
the binding API, instead of implicit communication by virtue of what
component contains what component. But what you are suggesting will
certainly work, if you really do want to do it.
--Jonathan
At 7:05 PM -0600 3/4/04, James Cicenia wrote:
Hello -
I was thinking of using WOComponentContent to wrap my pages. However,
I need to perform some logic in the header area, mainly switching tab states
and was wondering if there was a command to find the current page name.
This way I could use a conditional in WOComponentContent to switch out
the tab states depending on which page they had selected.
Thanks,
James Cicenia
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.