on 08-14-2017 2:30 PM
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.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i believe there is no
you have to put it in right namespace
<Dialog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.