[Dojo-interest] dojox/app: How to push/pop a view programmatically?

Ed Chatelain elchatelain at gmail.com
Thu Jan 23 14:34:48 EST 2014


I don't think you want to call:
registry.byId("contentDiv").set("href", "views/search.html");

When you call:
this.app.transitionToView(e.target,transOpts,e);
It will fire an event to load and transition to the view, so the view's
controller will not be available immediately after that call it is async.
 You should use the init(), and/or beforeActivate() functions of the
controller to do things you want to do when the controller is created.


On Thu, Jan 23, 2014 at 12:42 PM, KevG <Kev.Graham at libertymutual.com> wrote:

> I have a view
>         "searchview": {
>                         "controller" : "appBase/controllers/search.js",
>                         "constraint": "contentDiv",
>                         "template": "appBase/views/search.html"
>                 },
>
>
> When I use transitionToView (code below), I see the view template
> displayed.
>
> registry.byId("contentDiv").set("href", "views/search.html");
> var transOpts = {
>         title : "searchview",
>         target : "searchview"
> };
> this.app.transitionToView(e.target,transOpts,e);
>
> Should I be able to access function in the controller at this stage?
> I do not seem to be able to do this.
>
> Also the onclick functions in the view (defined in the controller), which
> work when the view is initially loaded, are no longer avaiable.
> Do I need another call to activate the controller?
>
>
>
> --
> View this message in context:
> http://dojo-toolkit.33424.n3.nabble.com/dojox-app-How-to-push-pop-a-view-programmatically-tp3995185p4000819.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> ________________________________________________________
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
>
> Dojo-interest at mail.dojotoolkit.org
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20140123/7f9f5f51/attachment.htm 


More information about the Dojo-interest mailing list