
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.ui.commons"
xmlns:table="sap.ui.table" controllerName="myController" displayBlock="true">
<table:Table rows="{/data}" title="Title" footer="Footer">
<table:columns>
<table:Column label="Lastname" template="lastname"> </table:Column>
<table:Column label="Firstname" template="firstname"> </table:Column>
</table:columns>
</table:Table>
</mvc:View>
XML View Example
var oTable = new sap.ui.table.Table({
title: "Title",
footer: "Footer",
rows: "{/data}",
columns: [
new sap.ui.table.Column({
label: "Firstname",
template: "firstname"
}),
new sap.ui.table.Column({
label: "Lastname",
template: "lastname"
})
]
});
Code Example
If your UI5 application uses the table controls from sap.ui.table without loading sap.m, the application might be affected by this change. To find out whether the sap.m library is already loaded in your application, open the UI5 Diagnostics window by pressing Ctrl/Cmd+Alt+Shift+S. You can find the information about "Loaded Libraries" in the "Technical Information" section in the support dialog that opens. If sap.m is not listed, it will be automatically loaded when using SAPUI5 1.118.
UI5 Diagnostics window
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.ui.commons"
xmlns:table="sap.ui.table" controllerName="myController"
displayBlock="true">
<table:Table rows="{/data}">
<table:title>
<TextView text="Title" wrapping="false"
class="sapUiTableHdrTitle"/>
</table:title>
<table:footer>
<TextView text="Footer" wrapping="false"/>
</table:footer>
<table:columns>
<table:Column>
<table:label>
<Label text="Lastname"/>
</table:label>
<table:template>
<TextView text="{lastname}" wrapping="false"/>
</table:template>
</table:Column>
<table:Column>
<table:label>
<Label text="Firstname"/>
</table:label>
<table:template>
<TextView text="{firstname}" wrapping="false"/>
</table:template>
</table:Column>
</table:columns>
</table:Table>
</mvc:View>
XML View Example
var oTable = new sap.ui.table.Table({
title: new sap.ui.commons.TextView({text: "Title",
wrapping: false}).addStyleClass("sapUiTableHdrTitle"),
footer: new sap.ui.commons.TextView({text: "Footer", wrapping: false}),
rows: "{/data}",
columns: [
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Firstname"}),
template: new sap.ui.commons.TextView({text: "{firstname}",
wrapping: false})
}),
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Lastname"}),
template: new sap.ui.commons.TextView({text: "{lastname}",
wrapping: false})
})
]
});
Code Example
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
13 | |
12 | |
9 | |
9 | |
6 | |
6 | |
6 | |
6 | |
5 |