tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/635-when-in-robotlegs-is-the-view-added-to-the-stageRobotlegs: Discussion 2018-10-18T16:35:30Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/93322622011-08-16T13:56:47Z2011-08-16T13:56:47ZWhen in RobotLegs is the view added to the stage<div><p>you can either mediate your contextView:<br>
<a href=
"http://knowledge.robotlegs.org/kb/reference-mvcs-implementation/can-i-mediate-my-root-application">
http://knowledge.robotlegs.org/kb/reference-mvcs-implementation/can...</a><br>
and add your view when you handle the data loaded event in the
mediator, or map your data loaded event to a command that adds your
view to the contextView directly (contextView is a property of all
commands)</p></div>matttag:robotlegs.tenderapp.com,2009-10-18:Comment/93322622011-08-16T15:57:53Z2011-08-16T15:57:53ZWhen in RobotLegs is the view added to the stage<div><p>Hi, thanks. I finally went for the command option, adding a view
to the context in my command.</p>
<p>Works perfectly.</p>
<p>Stephen</p></div>stephenadams1tag:robotlegs.tenderapp.com,2009-10-18:Comment/93322622011-08-16T17:07:04Z2011-08-16T17:07:04ZWhen in RobotLegs is the view added to the stage<div><p>You can also use the relaxed eventmap utility<br>
<a href=
"https://github.com/Stray/robotlegs-utilities-RelaxedEventMap">https://github.com/Stray/robotlegs-utilities-RelaxedEventMap</a></p>
<p>Personally I avoid adding views to the context in commands,
since IMO that's presentation logic and should be executed in views
only.</p></div>creynders