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?
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
-
No. It would be a bad design choise. Views should not communicate with far parent views, or even not parent. It will promote writing a messy logic.If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.Comment
Comment