on 01-01-2014 9:34 AM
Hello,
I want to implement a logic whenever a ValueHelpField loses focus. So I tried with the following code:
var oLayout = new sap.ui.commons.layout.MatrixLayout({layoutFixed :false});
oLayout.addRow(new sap.ui.commons.layout.MatrixLayoutRow({
cells:[new sap.ui.commons.layout.MatrixLayoutCell({
content: [new sap.ui.commons.Label({text :"Center: "})]
}),
new sap.ui.commons.layout.MatrixLayoutCell({
content:[new sap.ui.commons.ValueHelpField({
value: "",
valueHelpRequest: function(){alert("TODO"); },
change : [function(oEvent) { alert("CHANGE EVENT");} ],
onfocusout : [function(oEvent){ alert("onfocusout");} ]
})]
})
]
}));
oLayout.placeAt("content");
But, only the change event is working fine, onfocusout is never called. How to make it work?
Please Help Me.
Thanks & Regards,
Shubham Dehariya
Hi Subham,
Here is the snippet
var oLayout = new sap.ui.commons.layout.MatrixLayout({layoutFixed :false});
oLayout.addRow(new sap.ui.commons.layout.MatrixLayoutRow({
cells:[new sap.ui.commons.layout.MatrixLayoutCell({
content: [new sap.ui.commons.Label({text :"Center: "})]
}),
new sap.ui.commons.layout.MatrixLayoutCell({
content:[new sap.ui.commons.ValueHelpField({
value: "",
valueHelpRequest: function(){alert("TODO"); },
change : [function(oEvent) { alert("CHANGE EVENT");} ],
}).attachBrowserEvent("mouseout", function() {console.log('Mouse out triggerred ' + new Date().toLocaleTimeString());})
]
})
]
}));
oLayout.placeAt("content");
Regards,
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Atanu for the idea, instead of "mouseout" I am using "focusout" which is working perfectly.
Regards,
Shubham
Hi Shubham,
1.
change | Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed. |
2.onfocusout(oEvent😞
Event handler called when control is losing the focus
I think both are same. So both events don't work at the same time.
Regards,
Surendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.