<!DOCTYPE HTML>
<html style="height: 100%;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<script id="sap-ui-bootstrap"
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_fiori_3"
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-async="true"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"demo": "./"}'
data-sap-ui-xx-componentPreload="off"
data-sap-ui-xx-waitForTheme="true"
></script>
</head>
<body id="content" class="sapUiBody">
<div data-sap-ui-component
data-id="rootComponentContainer"
data-name="demo"
data-height="100%"
data-settings='{"id": "rootComponent"}'
></div>
</body>
</html>
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
], function(UIComponent, Device) {
"use strict";
return UIComponent.extend("demo.Component", {
metadata: {
manifest: "json"
},
init: function() {
UIComponent.prototype.init.apply(this, arguments);
this.getModel("device").setData(Device);
this.getRouter().initialize();
},
});
});
{
"_version": "1.16.0",
"start_url": "index.html",
"sap.app": {
"id": "demo",
"type": "application",
"title": "Demo",
"description": "Sample Code",
"applicationVersion": {
"version": "1.0.0"
}
},
"sap.ui": {
"technology": "UI5",
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
},
"supportedThemes": [
"sap_belize_hcw",
"sap_belize_hcb",
"sap_belize_plus",
"sap_belize",
"sap_fiori_3"
]
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.67.0",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.layout": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"resources": {
"js": [
],
"css": [
]
},
"models": {
"device": {
"type": "sap.ui.model.json.JSONModel"
}
},
"rootView": {
"viewName": "demo.view.App",
"id": "rootView",
"type": "XML",
"async": true
},
"routing": {
"routes": [{
"name": "home",
"pattern": "",
"target": "home",
"titleTarget": "home"
}],
"targets": {
"home": {
"viewId": "homeView",
"viewName": "Home",
"transition": "fade",
"viewLevel": 1
},
"notFound": {
"viewName": "Home",
"transition": "slide",
"viewLevel": 98
}
},
"config": {
"async": true,
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "demo.view",
"controlId": "rootApp",
"controlAggregation": "pages",
"transition": "slide",
"bypassed": {
"target": "notFound"
},
"homeRoute": "home"
}
}
}
}
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" displayBlock="true">
<App id="rootApp">
<pages>
<!-- Navigated views will be added by routing mechanism -->
</pages>
</App>
</mvc:View>
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m">
<Page id="homePage" title="Form Layout" class="sapUiResponsiveContentPadding">
<form:Form editable="true" xmlns:form="sap.ui.layout.form">
<form:layout>
<form:GridLayout backgroundDesign="Solid"/>
</form:layout>
<form:FormContainer>
<form:layoutData>
<form:GridContainerData
halfGrid="{:= ${device>/resize/width} > 600}"
/>
</form:layoutData>
<form:FormElement>
<form:label>
<Label text="Label"/>
</form:label>
<Input placeholder="Input"/>
</form:FormElement>
</form:FormContainer>
<form:FormContainer>
<form:layoutData>
<form:GridContainerData
halfGrid="{:= ${device>/resize/width} > 600}"
/>
</form:layoutData>
<form:FormElement>
<form:label>
<Label text="Label"/>
</form:label>
<Input placeholder="Input"/>
</form:FormElement>
</form:FormContainer>
<form:FormContainer>
<form:FormElement>
<form:label>
<Label text="Label"/>
</form:label>
<TextArea placeholder="Text Area"/>
</form:FormElement>
<form:FormElement>
<form:label>
<Label text="Label"/>
</form:label>
<TextArea placeholder="Text Area"/>
</form:FormElement>
</form:FormContainer>
<form:FormContainer>
<form:layoutData>
<form:GridContainerData
halfGrid="{:= ${device>/resize/width} > 600}"
/>
</form:layoutData>
<form:FormElement>
<form:label>
<Label text="Label"/>
</form:label>
<TextArea placeholder="Text Area"/>
</form:FormElement>
<form:FormElement>
<form:label>
<Label text="Label"/>
</form:label>
<Input placeholder="Input"/>
</form:FormElement>
</form:FormContainer>
<form:FormContainer>
<form:layoutData>
<form:GridContainerData
halfGrid="{:= ${device>/resize/width} > 600}"
/>
</form:layoutData>
<form:FormElement>
<form:label>
<Label text="Label"/>
</form:label>
<Input placeholder="Input"/>
</form:FormElement>
</form:FormContainer>
</form:Form>
</Page>
</mvc:View>