Re: Nested component communication
Re: Nested component communication
- Subject: Re: Nested component communication
- From: Jean-François Veillette <email@hidden>
- Date: Thu, 12 Aug 2004 08:32:04 -0400
So who hold the value of pageTitle and tabOne ? from what I understand
it's the page itself that pass this value to the page wrapper, correct
?
If I understand your layout, the communication is like this : from the
page to the wrapper, from the wrapper to the navigation bar and from
the bar to the menu items, and when user click on menu items, it would
goes like this : from menu items to a value and an action method.
it seem you need 2 binding to indicate this. selectedTab, and
selectedAction. the menu item would push in selectedTab the value
indicating the selected menu cell, and selected action would be the
method to invoke.
I have this kind of pattern in my current app, here is how I do :
TabInfo tabItem; // iterator on tab elements, used in worepetition,
hold all the info needed to show the content for specified tab.
public WOActionResults selectTab() { return selectPage(tabItem); }
public WOActionResults selectPage(TabInfo swf) {
if(hasBinding("selectedPage")) { setValueForBinding(swf,
"selectedPage"); }
if(hasBinding("action")) {return
performParentAction((String)valueForBinding("action")); }
return null;
}
hope this help,
- jfv
Le 04-08-11, ` 17:06, David Holt a icrit :
> Thanks Zak, Jean-Francois and Art,
>
> My pageWrapper includes the navigation bar and its menu items. It also
> includes the WOComponentContent which I use for my page content. I
> can't figure out how to nest both the navigation bar and the
> WOComponentContent for a given component. The values for pageTitle and
> the tabOne pass out from the componentContent to the wrapper with no
> problem, but tabOne doesn't pass automatically to the navigation bar
> and the menu items.
>
> The navigation bar is not nested in the sense of providing
> WOComponentContent, it is really just on the page that is generated,
> and likewise, the menu items are just on the navigation bar. Can I use
> non-synchronizing components in this case, or do they actually have to
> be nested using WOComponentContent ?
>
> Are there any examples out there of navigation bars with rollovers
> that change to fixed images when you are at the component the
> navigation image points to? Isn't this a common web interface
> paradigm?
>
> On 11 Aug 2004, at 12:49 PM, Art Isbell wrote:
>
>> On Aug 11, 2004, at 9:00 AM, Jean-Frangois Veillette wrote:
>>
>>> To minimize the risk of problems, do you component communication
>>> explicit and restrict it to the minimum only.
>>
>> I.e., override synchronizesVariablesWithBindings() to return false
>> in your subcomponent.
>>
>>>> David Holt wrote on 8/10/04 6:52 PM:
>>
>>>>> From my reading, it seems that the component communication is
>>>>> automatic from the parent components to child components so long
>>>>> as the variables are named the same thing.
>>
>> For a non-synchronizing subcomponent, the only sort of automatic
>> action I can think of is the use of the carat (^) syntax that will
>> automatically invoke valueForBinding()/setValueForBinding() without
>> your needing to implement these methods.
>>
>> I don't implement subcomponents often enough to become totally
>> comfortable doing so. But I can always sort things out by rereading
>> the "Creating Reusable Components" chapter in the _WebObjects
>> Developer's Guide_
>> (http://developer.apple.com/documentation/LegacyTechnologies/
>> WebObjects/WebObjects_4.5/System/Documentation/Developer/WebObjects/
>> DevGuide/ReuseTOC.html).
>>
>> Aloha,
>> Art
>> _______________________________________________
>> 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.
>>
>
>
> --
> Panic is not an effective, long-term organizing strategy.
>
> Starhawk
>
> from Sunbeams:
> http://
> www.thesunmagazine.org_______________________________________________
> 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.