I'd like to attach a liveChange
event to the Input
field of the reusable Fragment
-based Dialog
(Walkthrough Step 19: Reuse Dialogs).
In XML-template HelloDialog.fragment.xml
I've added:
<Input
id = "input-b"
type = "Password"
liveChange = ".onLiveChange"
placeholder = "Enter your password" />
In the fragment's controller HelloDialog.js
I've added:
onLiveChange: function (oEvent) {
const sNewValue = oEvent.getParameter("value");
this.byId("getValue").setText(sNewValue);
console.log("sNewValue");
}
Then I set in DevTools a break point in this method and try to type a text in the relevant Input
and expect that the break point will be fired but nothing happens.
I've tried to add onLiveChange
into the view's controller from where I call this fragment and to the Component.js
as well, but still no reaction.
The question is why onLiveChange
is not triggered in my case? In SAP Sample: Input - Value Update everything is OK, but they use a regular view, not a fragment-based dialog.