Hi All!

Are there any existing generic design pattern that allows establishing
two-way communication between views, implementing the navigation strategy
without using ViewLocator?

Let me introduce the example of what I mean. We have core view with
ViewStack inside, another one ViewStack in the first child of core ViewStack
and a Button instance in the first child on 3rd nesting level. Clicking the
button should cause changing visible child in core ViewStack from 1st to
2nd. 

If we use ViewLocator, we do something like this:

ViewLocator.getInstance().getViewHelper("coreViewHelper").setView(2);

And implement setView method in CoreViewHelper class. But I dislike such an
approach due to the lack of strict typification while using getViewHelper()
method and also because nested view know a bit about core view
implementation that is not flexible enough.

Also we could dispatch event from the 3rd nesting level child and subscribe
the coreViewHelper on it.

I would like to know about other ways to detach navigation strategy from
ViewHelpers and implement it as a generic NavigationManager that could be
inherited for particular structures.

Thank you in advance!

Sergey.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to