on 08-17-2014 7:19 PM
Hello,
I created a gist where you can see a simple app-page example created with JavaScript and at the bottom the corresponding XML if it would be a view (without controller.
Maybe this helps how to understand and "switch" mentally between the JavaScript syntax examples (for example here for a button SAPUI5 SDK - Demo Kit) and the now preferred XML notation of the views (SAPUI5 Explored).
Here is the gist:
https://gist.github.com/denisenepraunig/5a2049f13f8342f5608f
The example on jsbin is here:
JS Bin - Collaborative JavaScript Debugging
How do I get from JavaScript code...
var oSimpleForm = new sap.ui.layout.form.SimpleForm({ ...
to a XML view notation:
<mvc:View xmlns:f="sap.ui.layout.form" ...
<f:SimpleForm ...
or vice versa.
Hope this helps someone, at the beginning it was a mind-challenging exercise to switch between those two notations.
BR, Denise
exactly what I searched for
Working with XML views is simpler when you are not a native javascript developer !
<mvc:View xmlns:f="sap.ui.layout.form"
was my missing link - for defining all f: as linked to library sap.ui.layout.form
Thanks for sharing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Denise,
Nice work putting them side by side! Your gist perfectly shows why XML Views are (IMHO) a better choice than Javascript Views:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.