我需要计算UploadCollectionItem
上传了多少个附件(UploadCollection
)。
这是我的代码:
<IconTabFilter icon="sap-icon://attachment"
stretchContentHeight="true" text="Anexos"
count=""
>
<UploadCollection id="uploadCollection" items="{path: 'att>/d/results'}"
uploadComplete="onAttachmentUploadComplete" change="onAttachmentChange"
fileDeleted="onAttachmentDeleted" sameFilenameAllowed="true"
uploadUrl="/sap/opu/odata/sap/ZWEB_MM0007_SRV/FileProcessSet">
<items>
<UploadCollectionItem id="idUploadListItems"
documentId="{att>Id}" fileName="{att>FileName}" mimeType="{att>MimeType}"
uploadedDate=""
url="/sap/opu/odata/sap/ZWEB_MM0007_SRV/FileProcessSet(Id='{att>Id}',Filename='{att>FileName}',Requisicao='')/$value"
enableEdit="false" visibleEdit="false" visibleDelete="true" />
</items>
<parameters />
</UploadCollection>
</IconTabFilter>
我想在图标上显示相应数量的附件。
答案 0 :(得分:0)
我的建议是:
<IconTabFilter icon="sap-icon://attachment"
stretchContentHeight="true" text="Anexos"
//here the count
count="{att>/d/results.length}"
>
<UploadCollection id="uploadCollection" items="{path: 'att>/d/results'}"
uploadComplete="onAttachmentUploadComplete" change="onAttachmentChange"
fileDeleted="onAttachmentDeleted" sameFilenameAllowed="true"
uploadUrl="/sap/opu/odata/sap/ZWEB_MM0007_SRV/FileProcessSet">
<items>
<UploadCollectionItem id="idUploadListItems"
documentId="{att>Id}" fileName="{att>FileName}" mimeType="{att>MimeType}"
uploadedDate=""
url="/sap/opu/odata/sap/ZWEB_MM0007_SRV/FileProcessSet(Id='{att>Id}',Filename='{att>FileName}',Requisicao='')/$value"
enableEdit="false" visibleEdit="false" visibleDelete="true" />
</items>
<parameters />
</UploadCollection>
</IconTabFilter>