Skip to Content
avatar image
Former Member

Failed to load sap/ui/table/Dialog.js from resources/sap/ui/table/Dialog.js: 404

Hi All,

I need to display a tree table inside a dialog but not able to do, if i put normal element like a text inside the dialog it is getting displayed. Please find my code below.

VAS.fragment.xml


<core:FragmentDefinition xmlns:m="sap.m" xmlns:core="sap.ui.core" xmlns="sap.ui.table" xmlns:mvc="sap.ui.core.mvc" xmlns:u="sap.ui.unified">

<Dialog title="VAS Details" resizable="true" draggable="true" horizontalScrolling="true" verticalScrolling="true" >

<TreeTable id="TreeTableBasic">

<columns>

<Column width="13rem">

<m:Label text="EBELN"/>

<template>

<m:Text text="1"/>

</template> </Column>

</columns>

</TreeTable>

</Dialog>

</core:FragmentDefinition>

I am invoking the dialog as below

controller.js

var that = this;

if (!this.oVas) {

this.oVas = sap.ui.xmlfragment("MassChangePO.view.VAS", this); } //error in this line this.getView().addDependent(this.oVas);

oModel.read(iFilter, null, null, true, function(oData, response) {

var dropModel = new sap.ui.model.json.JSONModel();

dropModel.setData(oData.results);

that.oVas.setModel(dropModel); });

this.oVas.open();

I have a feeling that something in the fragment.xml code is incorrect but i am not able to find out what.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 14, 2017 at 03:52 PM

    in XML fragment code you have used xml namespace xmlns:m="sap.m" this implies that all mobile elements in the xml should start with 'm' in the beginning, but in your code you have used this only Label and Text not for any other elements.

    Use below code: (if you see the Dialog XML tag, it has 'm' in the begining)

    <core:FragmentDefinition 
        xmlns:m="sap.m" 
        xmlns:core="sap.ui.core" 
        xmlns="sap.ui.table" 
        xmlns:mvc="sap.ui.core.mvc" 
        xmlns:u="sap.ui.unified">
        <m:Dialog title="VAS Details" resizable="true" draggable="true" horizontalScrolling="true" verticalScrolling="true">
            <TreeTable id="TreeTableBasic">
                <columns>
                    <Column width="13rem">
                        <m:Label text="EBELN"/>
                        <template>
                            <m:Text text="1"/>
                        </template>
                    </Column>
                </columns>
            </TreeTable>
        </m:Dialog>
    </core:FragmentDefinition>
    
    
    Add comment
    10|10000 characters needed characters exceeded

  • Aug 14, 2017 at 03:44 PM

    i believe there is no

    sap/ui/table/Dialog.js,

    you have to put it in right namespace

    <Dialog

    Add comment
    10|10000 characters needed characters exceeded