tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/683-callout-mediatorRobotlegs: Discussion 2012-11-20T10:15:37Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/209205802012-11-16T14:26:02Z2012-11-16T14:26:02ZCallout Mediator<div><p>I have someview which is handled by someviewmediator.<br>
on someview there is a CalloutButton and on its click i have to
open a calloutA<br>
i have a calloutA which is handled by calloutAmediator. Now on the
calloutA i have few selections i have to make and there are two
buttons say buttonA and buttonB<br>
on buttonA i have to push someview with the updated selections.<br>
on buttonB i have to push someotherview which is handled by
someotherviewmediator.</p>
<p>on the application context i am mapping the view n mediators<br>
mediator.mapview(someview,someviewmediator);<br>
mediator.mapview(calloutA,calloutAmediator);<br>
mediator.mapview(someotherview,someotherviewmediator);</p>
<p>in someviewmediator on calloutButton Click i am trying to push
the calloutA.<br>
in calloutA mediator on buttonA and ButtonB clicks i am pushing the
views</p>
<p>when i am doing this i get an error Coercion failed: cannot
convert views::Callout@1290dae1 to spark.components.View.</p>
<p>how can i achieve it.</p></div>ditag:robotlegs.tenderapp.com,2009-10-18:Comment/209205802012-11-16T15:52:50Z2012-11-16T15:52:50ZCallout Mediator<div><p>See if you can use something like this:</p>
<p>A ViewNavigator:<br>
var
calloutNavigator:CalloutNavigator=injector.instantiate(CalloutNavigator);<br>
injector.mapValue(CalloutNavigator, calloutNavigator);<br>
mediatorMap.createMediator(calloutNavigator);</p>
<p>A Callout:<br>
var
someCallOutView:SomeCallOutView=injector.instantiate(SomeCallOutView);<br>
injector.mapValue(SomeCallOutView, someCallOutView);<br>
mediatorMap.createMediator(someCallOutView);</p>
<p>someCallOutView.open(popUpOwner);<br>
someCallOutView.setPopUpData("SOME DATA");<br>
someCallOutView.calloutGroup.addElement(calloutNavigator);</p>
<p>-*popUpOwner is a DisplayObjectContainer</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/209205802012-11-16T16:01:32Z2012-11-16T16:01:32ZCallout Mediator<div><p>I’d let the CalloutNavigatorMediator call a method on
CalloutNavigator (component), and within this method I’d push
other views.</p></div>Ondina D.F.