12-02-2016 8:03 AM - edited 01-21-2024 9:55 PM
Hi Experts,
I am implementing a similar behaviour to radio buttons using checkboxes (
sap.m.CheckBox
). I'm using checkboxes because the customer prefers it. Unfortunately I can't seem to find a way to set the checkbox value programmatically. I tried setting the attribute in a loop but it's probably a read only attribute - it didn't get taken into account.
Is it at all possible? a function setSelected is not available according to documentation here https://sapui5.netweaver.ondemand.com/#docs/api/symbols/sap.m.CheckBox.html
Thanks,
Ioan.
Hello Loan,
setSelected() is working.
this.getView().byId("checkBoxId").setSelected(true);
,Hello Radulescu,
Though, setSelected() is not seen to be available, it works.
this.getView().byId("checkBoxId").setSelected(true);
i tried the above code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yeah thanks, I had found out that too :). Out of sheer hopelessness I had tried that and it worked, even though documentation is not mentioning it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.