SAPUI5教程——在XML View中使用$运算符
来源:互联网 发布:沙宣男士洗发水 知乎 编辑:程序博客网 时间:2024/06/05 17:52
前言
在HTML5的世界中,之所以有框架的出现,是为了能够方便快捷的开发出我们想要的产品,今天我们来讲一下SAPUI5中一个非常重要而又比较常见的语法——$运算符在xmlView中的使用。
判断语句
不多说,直接上代码:
<!--Set to visible if the status is critical and the amount is above the threshold (note escaping of &&)-->visible="{= ${status} === 'critical' && ${amount} > 10000 }"
<!--Text for amount level using language-dependent texts from the resource model.-->text="{= ${/amount} > 10000 ? ${i18n>/high} : ${i18n>/normal} }"
<!--Set to visible if the rating is VIP, ignoring case or if the order amount is greater than 10,000.-->visible="{= ${/rating}.toUpperCase() === 'VIP' || ${/orderAmount} > 10000 }"
<!--Set to visible if the rating contains VIP, ignoring the case. -->visible={= RegExp('vip', 'i').test(${/rating}) }
<!--Text is maximum of three values.-->text="{= Math.max(${/value1}, ${/value2}, ${/value3}) }"
<!--Control is enabled only if the order status is set.--> enabled="{= ${/orderStatus} !== null }"
更多教程:
http://edu.csdn.net/course/detail/5046
阅读全文
2 0
- SAPUI5教程——在XML View中使用$运算符
- SAPUI5教程——URLHelper的使用技巧
- SAPUI5教程——查看系统安装的SAPUI5版本
- SAPUI5教程——ActionSheet的应用
- SAPUI5教程——Content Densities
- SAPUI5教程——MaskInput的妙用
- 自定义view在XML中使用
- APIDemo学习笔记——在XML中使用自定义的View类
- SAPUI5教程——框架简介以及应用实践
- SAPUI5教程——SAP WEB IDE崩溃
- SAPUI5教程——清除SAP Fiori服务缓存
- SAPUI5教程—— Link的基本用法
- SAPUI5教程——更改ODataModel默认的请求方式
- SAPUI5教程——安装Hybrid Application Tools失败
- SAPUI5教程——MessageStrip的应用场景
- SAPUI5教程——Aggregation Binding的应用
- SAPUI5教程——最全中文学习指南(必看)
- sapui5 app中使用自定义css文件
- 前端笔记——node.js
- 无限引流大助手3.0开源版
- Oracle中left join,right join,inner join分析
- 多线程之多个窗口卖票02
- 爬格子呀4-1
- SAPUI5教程——在XML View中使用$运算符
- 更新环境变量path厚java版本version不变
- socket传输小文件的一个思考
- 安装jdk1.8步骤简介
- 170道Java工程师面试题,你敢挑战吗?
- 实用小技巧备份
- Myeclipse2017最新版激活
- 《零基础入门学习Python》学习过程笔记【56下载一个网站指定页数的XXOO图】
- [php]模拟socket发送GET,POST请求