cancel
Showing results for 
Search instead for 
Did you mean: 

FragmentDefinition data binding

abityildiz
Active Participant
0 Kudos

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>

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member228602
Contributor
0 Kudos

   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

junwu
Active Contributor
0 Kudos

help what?

abityildiz
Active Participant
0 Kudos

hi Jun Wu,

i am using GeoMap.Click to spot,show details in the fragment.

junwu
Active Contributor
0 Kudos

what's the problem now?