If I want to use the quickCreate method from views/site/navbar in another view or from f12 console is there a way to get a reference to the existing view?
Announcement
Collapse
No announcement yet.
webapp javascript how to get reference to other view
Collapse
X
-
I propose as a new feature to have an externally-accessible object that exposes the current view and model graph. so for example one would do something like assigning callbacks for other js libraries.
Other than that maybe assigning the app object to window instead of keeping it in anonymous scope could be a way to interact with it and obtain properly references.
Comment
-
One of the problems that sparked my question is this: I extended the 'setup' method of 'views/detail' for Call scope to add a button to the menu if a custom field is set to true. I am working on updating after the entity is saved by using the listenTo('after:save'). It works mostly, but I see that some times the data is not yet loaded (this.model.attributes.myField is undefined, but it is true in the database). How can I wait from the extended setup method the loading of the model?Last edited by tothewine; 06-03-2020, 06:22 PM.
Comment
Comment