on 05-04-2016 3:54 PM
hi all,
i want to click to button,and open the FragmentDefinition dialog page.i want to get click getBindingContext and show the frangment..
can you help me please?
master page code:
var oContext = evt.getSource().getBindingContext();
this.oAlertDialog = sap.ui.xmlfragment("view.MapRMSA",oContext,this);
this.oAlertDialog.open();
fragment xml:
<core:FragmentDefinition xmlns="sap.m" xmlns:l="sap.ui.layout" xmlns:core="sap.ui.core">
<Dialog title="RMSA">
<content>
<Label id="label1" text="{company}"></Label>
<Label id="label2"></Label>
</content>
<endButton>
<Button text="Kapat" press="onDialogClose" />
</endButton>
</Dialog>
</core:FragmentDefinition>
I think you need to add the Fragment as a dependent to the View and Model should inherited to the fragment as well.
var oContext = evt.getSource().getBindingContext();
this.oAlertDialog = sap.ui.xmlfragment("view.MapRMSA",oContext,this);
this.getView().addDependent(oAlerDialog);
this.oAlertDialog.open();
Thanks and Regards,
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
help what?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.