- SAP UI5 教程
- SAP UI5 - 首页
- SAP UI5 - 概述
- SAP UI5 - 架构
- SAP UI5 - 关键组件
- SAP UI5 - 控件库
- SAP UI5 - 开发工具包
- SAP UI5 - MVC 概念
- SAP UI5 - 视图
- SAP UI5 - 开发者工作室
- SAP UI5 - 创建 UI5 项目
- SAP UI5 - 控件
- SAP UI5 - 数据绑定
- SAP UI5 - 设计模式
- SAP UI5 - 模块化
- SAP UI5 - 本地化
- SAP UI5 - 记事本控件
- SAP UI5 - 扩展应用程序
- SAP UI5 - 主题
- SAP UI5 - 移动
- 在 Web IDE 中创建项目
- SAP UI5 有用资源
- SAP UI5 - 快速指南
- SAP UI5 - 有用资源
- SAP UI5 - 讨论
SAP UI5 - 控件
在开发 UI5 应用程序时,您可以使用不同类型的 UI 控件。这些控件可让您在 UI5 应用程序中添加按钮、表格、图像、布局、下拉框以及各种其他控件。
常见的控件类型包括 -
- 简单控件
- 复杂控件
- UX3 控件
- 对话框
- 布局
图像控件
Var image = new sap.ui.commons.Image(); Image.setSrc(“Image1.gif”); Image.setAlt(“alternat.text”);
下拉框
您可以使用下拉框来提供预定义的条目。
属性 - 项目、选定键
Var oComboBox2 = new sap.ui.commons.ComboBox (“ComboBox”,{
Items:{path:”/data”,
Template:oItemTemplate, filters:[oFilter]},
Change: function(oEvent){
Sap.ui.getCore(). byId(“field”).setValue(
oEvent.oSource.getSelectedKey());
}
});
简单按钮控件
使用 attachPresss 分配推送操作的事件处理程序。
Var oButton = new sap.ui.commons.Button ({text : “Click”,
Press: oController.update
});
自动完成控件
自动完成输入的值。
Var uiElement = new sap.ui.commons.AutoComplete({
Tooltip: ”Enter the product”,
maxPopupItems: 4
});
For (var i = 0; i<aData.lenght; i++){
uiElement.addItem(new sap.ui.core.ListItem(
{text: aData[i].name}));
}
表格控件框
它源自 sap.ui.table,并且每个表格包含列。
Var oTable = new sap.ui.table.Table({
Columns: [
New sap.ui.table.Column({
Label: new sap.ui.commons.lable({ text: “First Column”}),
Template: new sap.ui.commons.TextView({ text: “{Firstcolumn}” }),
Width: “120px”
})
广告
