on 06-23-2015 2:19 PM
Hi all,
I am calling the popup the pop dialog is triggered but i am not able to close the method is not triggered.what might be the issue?
view3.controller
//call the pop up to display the line items
if (!this._Popdelitems) {
this._Popdelitems = sap.ui.xmlfragment("d2","app.POP_Delitems",this);
sap.ui.getCore().byId("idUI_view3").addDependent(this._Popdelitems);
}
this._Popdelitems.open();
popup close method in view3.controller is not triggered.
onCloseDialog:function(){
this._Popdelitems.close();
}
Thanks
Deepan Ignaatious
Hi Deepan,
What is the context of 'this' in method onCloseDialog:function ?
1.try this.close() in case the this refers to the _Popdelitems
if 1 does not work
2. try console.log to check the context
onCloseDialog:function(){
console.log('this'+this);
console.log('popup'+this._Popdelitems);
this._Popdelitems.close();
}
Thanks and Regards, Venkatesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The fragment
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form">
<Dialog
title="items"
class="sapUiPopupWithPadding" >
<content>
<Table id="iditemTable"
title="Delivery header details"
inset="false"
items="{oitems>/results}"
modeAnimationOn="true">
<columns>
<Column
minScreenWidth="Tablet"
demandPopin="true">
<Text text="Item" />
</Column>
<Column
minScreenWidth="Tablet"
demandPopin="true">
<Text text="number" />
</Column>
<Column
minScreenWidth="Tablet"
demandPopin="true">
<Text text="text" />
</Column>
<Column
minScreenWidth="Tablet"
demandPopin="true">
<Text text="Quantity" />
</Column>
<Column
minScreenWidth="Tablet"
demandPopin="true">
<Text text="UOM" />
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{oitems>POSNR}" />
<Text text="{oitems>MATNR}" />
<Text text="{oitems>ARKTX}" />
<Text text="{oitems>LFIMG}" />
<Text text="{oitems>MEINS}" />
</cells>
</ColumnListItem>
</items>
</Table>
</content>
<beginButton>
<Button text="Close" press="onCloseDialog" />
</beginButton>
</Dialog>
</core:FragmentDefinition>
hi
yes when i try the following in console it closes but the the function onCloseDialog is not triggered inside which i have written this._Popdelitems.close();
sap.ui.getCore().byId('YourDialogId').close();
this._Popdelitems.close();
is it some issue related to setting the controller of the dialog?
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.