cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member365727
Active Contributor

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>

Answers (1)

Answers (1)

junwu
Active Contributor

i believe there is no

sap/ui/table/Dialog.js,

you have to put it in right namespace

<Dialog