I'm trying to create two widgets that use <sap-context>
feature for HANA Cloud Portal using SAPUI5 framework.
The problem is that I cannot find any tutorials/examples of using mvc model for widget creation. Every example I have found till now uses SAPUI5 inside <script>
tag in html file as if it's jquery or javascript.
Is it possible at all to create widgets using mvc model at all? If it is, links for examples/tutorials would help me alot.
NB:
As a matter of fact, I did try to use mvc model, but when I try to call a function using the following syntax:
sap.ui.getCore().byId('<view-name-here>').getController().publish("<key-name-here>", "<value-here>");
I get Uncaught TypeError: Cannot read property 'getController' of undefined
error. I'm not sure what causes this error - is it a flaw in my code or the fact that there is no 'core' if I don't build SAPUI5 application... (I'm still new to this SAPUI5 thing)
Thank you.