mvc.Components.get('highlight').getVisualization(function(tableView)
I've been searching a lot on where do I find this line of code on many frameworks but unfortunately I can't find any. Can you point me to the right direction? Because I really want to know what the code really does and I want to utilize it to what I want to do. Thank you so much. Any help would be appreciated.
Unfortunately, I can't point you to some hard evidence in the form of comprehensive documentation. From experience however I can tell you what this is used for: when you create components in Simple XML on a dashboard and you want to do something with it in javascript (e.g. add a custom table cell renderer to a table, change the options of a multiselect, listen to changes on inputs and much more). See here for a simple example, here for a more comprehensive one, and here for the (mostly) complete reference of this web framework.
There are two such methods: mvc.Components.get()
, which will only work when the object is already there and throw an error if it isn't, and mvc.Components.getInstance()
will create the object if it doesn't already exist - see this question here.
Generally, the frameworks used are listed here, so you will have to find most of the methods described within those (most importantly to you as a developer, backbone.js and jquery.js). However I have to admit that it can be frustrating sometimes, because for instance both backbone.js and jquery.js provide a method to listen to events with .on("change", someHandler)
, but their functions use slightly different syntax and you're left to figure out which one to use.
In the case of the get()
you mentioned, I'd say it comes from backbone.js because it is in the class mvc
which is also from backbone.
Unfortunately, I can't point you to some hard evidence in the form of comprehensive documentation. From experience however I can tell you what this is used for: when you create components in Simple XML on a dashboard and you want to do something with it in javascript (e.g. add a custom table cell renderer to a table, change the options of a multiselect, listen to changes on inputs and much more). See here for a simple example, here for a more comprehensive one, and here for the (mostly) complete reference of this web framework.
There are two such methods: mvc.Components.get()
, which will only work when the object is already there and throw an error if it isn't, and mvc.Components.getInstance()
will create the object if it doesn't already exist - see this question here.
Generally, the frameworks used are listed here, so you will have to find most of the methods described within those (most importantly to you as a developer, backbone.js and jquery.js). However I have to admit that it can be frustrating sometimes, because for instance both backbone.js and jquery.js provide a method to listen to events with .on("change", someHandler)
, but their functions use slightly different syntax and you're left to figure out which one to use.
In the case of the get()
you mentioned, I'd say it comes from backbone.js because it is in the class mvc
which is also from backbone.