Created
September 18, 2020 18:11
-
-
Save fabiopagoti/9bd46a7e8c6327aff99d713f1fd9d834 to your computer and use it in GitHub Desktop.
McrCoderDojo : Public Github Repos for Users // source https://jsbin.com/xofaweq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta charset="UTF-8"> | |
| <title>McrCoderDojo : Public Github Repos for Users</title> | |
| <script id="sap-ui-bootstrap" | |
| type="text/javascript" | |
| src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" | |
| data-sap-ui-theme="sap_bluecrystal" | |
| data-sap-ui-libs="sap.m" | |
| data-sap-ui-xx-bindingSyntax="complex" | |
| > | |
| </script> | |
| <script id="main" type="ui5/xmlview"> | |
| <mvc:View | |
| controllerName="local.controller.main" | |
| displayBlock="true" | |
| xmlns:mvc="sap.ui.core.mvc" | |
| xmlns:core="sap.ui.core" | |
| xmlns="sap.m"> | |
| <Text text="{/value}"/> | |
| <Input value="{/value}" valueLiveUpdate="true" liveChange="onLiveChange" /> | |
| </mvc:View> | |
| </script> | |
| <script> | |
| // Local controller | |
| sap.ui.controller("local.controller.main", { | |
| onInit: function(){ | |
| this._mod = new sap.ui.model.json.JSONModel({ | |
| value: "" | |
| }); | |
| this.getView().setModel(this._mod); | |
| }, | |
| onLiveChange : function(oEvent) { | |
| var sValue = this._mod.getProperty("/value"); | |
| if(sValue){ | |
| sValue = sValue.replace(/ /g, ""); | |
| this._mod.setProperty("/value", sValue); | |
| } | |
| } | |
| }); | |
| sap.ui.xmlview({ viewContent: jQuery("#main").html() }).placeAt("content"); | |
| </script> | |
| </head> | |
| <body id="content" | |
| class="sapUiBody" /> | |
| </html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment