cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting data in Popover

Former Member
0 Kudos

I have a button in a table row. when I click that button popover opens, but the data is not shown.

this is what my code looks like for popover.

_handleLABEL: function(oEvent) {
    //1 open a popover and show labels
    var oCtx = oEvent.getSource().getBindingContext("poItem101SetJson");
    let oControl = oEvent.getSource();
    let oView = this.getView();

    // create popover
    if (!this._pPopover) {
        this._pPopover = Fragment.load({
            id: oView.getId(),
            name: "com.wel.goodsreceipt.fragments.popover.LabelPopOver",
            controller: this
        }).then(function(oPopover) {
            oView.addDependent(oPopover);
            oPopover.bindElement({
                path: oCtx.getPath(),
                model: "poItem101SetJson"
            });
            // oPopover.bindElement(oCtx.getPath(), { model: "poItem101SetJson"});
            oPopover.attachAfterOpen(function() {
                this.disablePointerEvents();
            }, this);

            oPopover.attachAfterClose(function() {
                this.enablePointerEvents();
            }, this);
            return oPopover;
        }.bind(this));
    }
    this._pPopover.then(function(oPopover) {
        oPopover.openBy(oControl);
    });
},<br>

XML

<List id="id_list_inside_popover">
   <InputListItem id="id_inputlistItem_popover" label="Label Prefix">
      <Input class="input_css" liveChange="onLiveChangeForLabelPopOver" width="70%" id="id_label_prefix_input_field" value="{ShortText}" />
   </InputListItem>
   <InputListItem id="id_inputlistItem_popover_1" label="Counter Start">
      <Input class="input_css" liveChange="onLiveChangeForLabelPopOver" width="72%" value="{poItem101SetJson>ShortText}" id="id_counter_start_input_field" />
   </InputListItem>
   <InputListItem id="id_inputlistItem_popover_2" label="Label Start">
      <Text id="id_label_start_text_field" text="{poItem101SetJson>ShortText}" />
   </InputListItem>
   <InputListItem id="id_inputlistItem_popover_3" label="Label End">
      <Text id="id_label_end_text_field" text="{poItem101SetJson>ItemType}" />
   </InputListItem>
</List><br>

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

you need to use form, not list.

Former Member
0 Kudos

Hi jun.wu5,

I tried with form, but still it is not showing data.

junwu
Active Contributor
0 Kudos

code please