Search code examples
sapui5

Error While Creating a Dialog Box Using XML Fragments


I am getting the below error while trying to display a dialog box after user presses a button,

sap-ui-core.js:80 Uncaught Error: failed to load 'sap/m/buttons.js' from resources/sap/m/buttons.js: 404 - Resource could not be found!

Please find the XML code below.

<Dialog xmlns="sap.m"
  icon="sap.icon://filter"
  title="Filter product details">
  <content>
    <List id="ls2"
      items="{/value}"
      mode="MultiSelect">
      <StandardListItem title="{CompanyName}"/>
    </List>
  </content>
  <buttons>
    <Button text="ok" icon="sap-icon://accept" press="handleok"/>
    <Button text="Cancel" icon="sap.icon://cancel"/>  
  </buttons>
</Dialog>

Solution

  • So the issue was that the UI5 version was quite outdated after all. The aggregation buttons was introduced as of version 1.21.1.