SAPUI5从流/$ value中的sap.m.image中加载src

2020-09-10 20:12发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)你好同事 我需要一些有关SAP...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好同事

我需要一些有关SAPUI5 sap.m.image以及从流中加载图像的帮助。 我的oData后端系统是ECC 6 EHP 8,该服务具有按流提供来自文档管理服务的图像的服务。 在浏览器或Gateway Client中粘贴完整的URL时可以获得数据。 我的大问题是如何在WebIDE中执行此操作?
我的oData如下所示:

 {" d":{"结果":[{" __元数据":{" id":" http://my.server.com:8018/sap/opu/odata/web/LL_NOTIF_SRV/LLAttachmentSelectionSet(DocumentNumber  ='0000000000000010000001429',NotificationId ='630000000085')"," uri":" http://my.server.com:8018/sap/opu/odata/web/LL_NOTIF_SRV/LLAttachmentSelectionSet(DocumentNumber='0000000000000010000001429',NotificationId=  '630000000085')"," type":" WEB.LL_NOTIF_SRV_01.LLAttachmentSelection"}," DocumentNumber":" 0000000000000010000001429"," NotificationId":" 630000000085"," TaskNum":" 0000"," DocOrigin":" LL测试 文档类型JPEG"," DocType":" ZLL"," DocPart":" 000"," DocVersion":" 00"," DocApplication":" JPG"," DocData":""," CreatedAt":" 20190401144744  "," CreatedBy":" XBECKERR"," CreatorName":"罗马贝克尔"," DocumentFileSize":" 000000031128"," Notification":""," DocumentExtension":""," DocumentCategory":""," LLStream  ":{" __deferred":{" uri":" http://my.server.com:8018/sap/opu/odata/web/LL_NOTIF_SRV/LLAttachmentSelectionSet(DocumentNumber='0000000000000010000001429',No  tificationId ='630000000085')/LLStream"}}},{" __ metadata":{" id":" http://my.server.com:8018/sap/opu/odata/web/LL_NOTIF_SRV/LLAttachmentSelectionSet(DocumentNumber=  '0000000000000010000001430',NotificationId ='630000000085')"," uri":" http://my.server.com:8018/sap/opu/odata/web/LL_NOTIF_SRV/LLAttachmentSelectionSet(DocumentNumber='0000000000000010000001430',NotificationId='  630000000085')"," type":" WEB.LL_NOTIF_SRV_01.LLAttachmentSelection"}," DocumentNumber":" 0000000000000010000001430"," NotificationId":" 630000000085"," TaskNum":" 0000"," DocOrigin":" LL测试文档 类型GIF"," DocType":" ZLL"," DocPart":" 000"," DocVersion":" 00"," DocApplication":" GIF"," DocData":""," CreatedAt":" 20190401145758"  ," CreatedBy":" XBECKERR"," CreatorName":"罗马贝克尔"," DocumentFileSize":" 000000001261","通知":""," DocumentExtension":""," DocumentCategory":""," LLStream"  :{" __deferred":{" uri":" http://my.server.com:8018/sap/opu/odata/web/LL_NOTIF_SRV/LLAttachmentSelectionSet(DocumentNumber='000000000000  0010000001430',NotificationId ='630000000085')/LLStream"}}}]}}
 

根据我的理解,这必须是SRC值: http://my.server.com :8018/sap/opu/odata/web/LL_NOTIF_SRV/LLAttachmentSelectionSet(DocumentNumber ='0000000000000010000001430',NotificationId ='630000000085')/LLStream/$ value在我的基本理解下,我已经尝试过类似的操作来获得所示的图像:

 
 <页面>
 
 
  

感谢您的帮助。 一个使用Stream/$ value的工作示例将是很棒的。

非常感谢您的支持。

最好的问候

罗马

1条回答
哎,真难
2020-09-10 20:31

罗马你好,希望你一切都好。

$ value的添加是odata属性所独有的。 一种可行的方法是在包含src的实体LLStream上创建属性。 就像下面的示例一样:

在浏览器上粘贴网址以获取实体 Categories

的属性 Picture
 https://services.odata.org/V2/Northwind/Northwind.svc/Categories(1)/Picture 
使用以下网址在应用程序上呈现图像:
  

一周热门 更多>