电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

SAP UI5应用里类型为Edm.DateTime的日期控件设计原理.docx

5页
  • 卖家[上传人]:A***
  • 文档编号:143360066
  • 上传时间:2020-08-28
  • 文档格式:DOCX
  • 文档大小:883.09KB
  • / 5 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 1、SAP UI5应用里类型为Edm.DateTime的日期控件设计原理Recently I was struggled with a customer incident and finally I realized that I didnt understand the Edm.DateTime quite clearly. So I spend some time to do research on it to fix my knowledge gap. I list my learning here in case any other guy needs it as well.For my study, I use this field in my application for example.It is bound to json model field “ClosingDate” with a formatter.In the metadata, this field is defined with type Edm.DateTime (Represents date and

      2、time with values ranging from 12:00:00 midnight, January 1, 1753 A.D. through 11:59:59 P.M, December 9999 A.D.)After I change the closingDate to 2015-10-3 and save the change:The saved opportunity is reread from backend with an odata request. In Chrome network tab I observed the closingDate has this format: /Date(1443830400000)/:What makes me curious is when I directly paste the url of the odata request to Chrome or SAP gateway client, I get the closingDate with this format instead. The figure b

      3、elow is response in Chrome:And this is response from gateway client.Why is there difference between them?And when I type “alert(new Date(1443830400000);” in chrome console, I get this popup:Actually it ( 2015-10-03 08:00:00 GMT +0800 ) points to exactly the same time as 2015-10-03 00:00:00 UTC.So how could the date with format /Date(1443830400000)/ be consumed in my application?It makes sense to start debugging via the framework handler when the response of odata request ( Opportunity re-read af

      4、ter closing date is changed ) is successfully returned:check the body field:The aim is to figure out how framework parses this /Date(1443744000000)/.Then I reached the place:(1) there is a regular expression which extracts the number 1443744000000 from the input string.(2) a local time is returned by new Date(), with the number parsed by previous step passed in. The local time is returned based on current Time zone configured in my laptop.Thanks to the framework, which has parsed the raw json response string to Javascript object, so that we application could directly use the converted object to bind our model.Then the local time returned by framework will be passed into my formatter so now I could do any formatting based on customer requirement:外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-V7xzygvx-1596956679633)(https:/upload-images.jianshu.io/upload_images/2085791-bfe738ad92f3cb66.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)要获取更多Jerry的原创文章,请关注公众号汪子熙:

      《SAP UI5应用里类型为Edm.DateTime的日期控件设计原理.docx》由会员A***分享,可在线阅读,更多相关《SAP UI5应用里类型为Edm.DateTime的日期控件设计原理.docx》请在金锄头文库上搜索。

      点击阅读更多内容
    最新标签
    信息化课堂中的合作学习结业作业七年级语文 发车时刻表 长途客运 入党志愿书填写模板精品 庆祝建党101周年多体裁诗歌朗诵素材汇编10篇唯一微庆祝 智能家居系统本科论文 心得感悟 雁楠中学 20230513224122 2022 公安主题党日 部编版四年级第三单元综合性学习课件 机关事务中心2022年全面依法治区工作总结及来年工作安排 入党积极分子自我推荐 世界水日ppt 关于构建更高水平的全民健身公共服务体系的意见 空气单元分析 哈里德课件 2022年乡村振兴驻村工作计划 空气教材分析 五年级下册科学教材分析 退役军人事务局季度工作总结 集装箱房合同 2021年财务报表 2022年继续教育公需课 2022年公需课 2022年日历每月一张 名词性从句在写作中的应用 局域网技术与局域网组建 施工网格 薪资体系 运维实施方案 硫酸安全技术 柔韧训练 既有居住建筑节能改造技术规程 建筑工地疫情防控 大型工程技术风险 磷酸二氢钾 2022年小学三年级语文下册教学总结例文 少儿美术-小花 2022年环保倡议书模板六篇 2022年监理辞职报告精选 2022年畅想未来记叙文精品 企业信息化建设与管理课程实验指导书范本 草房子读后感-第1篇 小数乘整数教学PPT课件人教版五年级数学上册 2022年教师个人工作计划范本-工作计划 国学小名士经典诵读电视大赛观后感诵读经典传承美德 医疗质量管理制度 2 2022年小学体育教师学期工作总结
    关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
    手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
    ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.