cancel
Showing results for 
Search instead for 
Did you mean: 

Binding Items in a Dialog ...

02-13-2019 2:59 PM
1045 views 4 comments
0 Likes
SAP Managed Tags
Subscribe

Hi, i'm trying to bind items in my fragment..

the table in my main view is like this...

_loadContent: function(context) {
        let tbGenerations = this.getView().byId("tbGenerations");
        let template = tbGenerations.getBindingInfo("items").template;

        let path =
          "gia_es_odata>/CONTROLE_TELA_PARAM(P_MANDT='" +
          context.MANDT +
          "',P_ORGSTR='" +
          context.ORGSTR +
          "',P_PERIODO='" +
          context.PERIODO +
          "',P_ANO='" +
          context.ANO +
          "')/Results";

        return new Promise((resolve, reject) => {
          tbGenerations.bindItems(path, template);

          tbGenerations.getBinding("items").attachChange(() => {
            resolve();
          });
        });

I want to do almost the same thing on the fragment.. how I do that?

_onHistory: function(context) {
    ...
}

Thank you .

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

jorge_cabanas
Participant
0 Likes

Hi Carlos,

The controller will be the same for the fragment. Look at the official doc:
https://sapui5.hana.ondemand.com/#/topic/4da72985139b4b83b5f1c1e0c0d2ed5a