Master.view.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <mvc:View
  2. controllerName="sap.ui.demo.orderbrowser.controller.Master"
  3. xmlns="sap.m"
  4. xmlns:mvc="sap.ui.core.mvc"
  5. xmlns:core="sap.ui.core"
  6. xmlns:semantic="sap.f.semantic">
  7. <semantic:SemanticPage id="page"
  8. core:require="{
  9. formatMessage: 'sap/base/strings/formatMessage',
  10. DateType: 'sap/ui/model/type/Date'
  11. }">
  12. <semantic:titleHeading>
  13. <Title
  14. id="masterHeaderTitle"
  15. text="{
  16. parts: [
  17. 'i18n>masterTitleCount',
  18. 'masterView>/titleCount'
  19. ],
  20. formatter: 'formatMessage'
  21. }"/>
  22. </semantic:titleHeading>
  23. <semantic:content>
  24. <!-- For client side filtering add this to the items attribute: parameters: {operationMode: 'Client'}}" -->
  25. <List
  26. id="list"
  27. width="auto"
  28. class="sapFDynamicPageAlignContent"
  29. items="{
  30. path: '/Orders',
  31. parameters: {expand: 'Customer'},
  32. sorter: {
  33. path: 'OrderID',
  34. descending: true
  35. },
  36. groupHeaderFactory: '.createGroupHeader'
  37. }"
  38. busyIndicatorDelay="{masterView>/delay}"
  39. mode="{= ${device>/system/phone} ? 'None' : 'SingleSelectMaster'}"
  40. growing="true"
  41. growingScrollToLoad="true"
  42. updateFinished=".onUpdateFinished"
  43. selectionChange=".onSelectionChange">
  44. <noData>
  45. <IllustratedMessage
  46. title="{masterView>/noDataText}"
  47. illustrationType="sapIllus-NoFilterResults"
  48. enableDefaultTitleAndDescription="false"/>
  49. </noData>
  50. <infoToolbar>
  51. <Toolbar
  52. active="true"
  53. id="filterBar"
  54. visible="{masterView>/isFilterBarVisible}"
  55. press=".onOpenViewSettings">
  56. <Title
  57. id="filterBarLabel"
  58. text="{masterView>/filterBarLabel}" />
  59. </Toolbar>
  60. </infoToolbar>
  61. <headerToolbar>
  62. <OverflowToolbar>
  63. <SearchField
  64. id="searchField"
  65. showRefreshButton="true"
  66. tooltip="{i18n>masterSearchTooltip}"
  67. width="100%"
  68. search=".onSearch">
  69. <layoutData>
  70. <OverflowToolbarLayoutData
  71. minWidth="150px"
  72. maxWidth="240px"
  73. shrinkable="true"
  74. priority="NeverOverflow"/>
  75. </layoutData>
  76. </SearchField>
  77. <ToolbarSpacer/>
  78. <Button
  79. id="filterButton"
  80. press=".onOpenViewSettings"
  81. icon="sap-icon://filter"
  82. type="Transparent"/>
  83. <Button
  84. id="groupButton"
  85. press=".onOpenViewSettings"
  86. icon="sap-icon://group-2"
  87. type="Transparent"/>
  88. </OverflowToolbar>
  89. </headerToolbar>
  90. <items>
  91. <ObjectListItem
  92. type="{= ${device>/system/phone} ? 'Active' : 'Inactive'}"
  93. press=".onSelectionChange"
  94. title="{
  95. parts: [
  96. 'i18n>commonItemTitle',
  97. 'OrderID'
  98. ],
  99. formatter: 'formatMessage'
  100. }"
  101. number="{
  102. path: 'OrderDate',
  103. type: 'DateType',
  104. formatOptions: { style: 'short' }
  105. }">
  106. <firstStatus>
  107. <ObjectStatus
  108. state="{
  109. parts: [
  110. {path: 'RequiredDate'},
  111. {path: 'ShippedDate'},
  112. {path: 'OrderID'}
  113. ],
  114. formatter:'.formatter.deliveryState'
  115. }"
  116. text="{
  117. parts: [
  118. {path: 'RequiredDate'},
  119. {path: 'ShippedDate'},
  120. {path: 'OrderID'}
  121. ],
  122. formatter:'.formatter.deliveryText'
  123. }"/>
  124. </firstStatus>
  125. <attributes>
  126. <ObjectAttribute id="companyName" text="{Customer/CompanyName}" />
  127. <ObjectAttribute title="{i18n>commonItemShipped}"
  128. text="{= ${ShippedDate}
  129. ? ${ path: 'ShippedDate',
  130. type: 'DateType',
  131. formatOptions: { style: 'medium' } }
  132. : ${i18n>commonItemNotYetShipped} }" />
  133. </attributes>
  134. </ObjectListItem>
  135. </items>
  136. </List>
  137. </semantic:content>
  138. </semantic:SemanticPage>
  139. </mvc:View>