on 12-23-2010 3:19 PM
Hi,
I have created a kind of form like the following:
Chackbox - Input filed
I would like the input field to become enabled when the checkbox is checked. The problem is that my checkbowx is always disabled, even when I choose enabled in the UI Element properties, and even when I bind the checkbox to a true boolean context attribute.
What is wrong with my checkbox ? I am not able to make it work properly. Any advice on the problem ?
The context attribute is initialized in the DoInit method of the View Controller. It's value is displayed using the message manager to see if it is truly true or not and it is.
Thanks in advance for your help,
Thibault
Dear Thibault,
Please check the cardinality of the node that you have created. the cardinality should be either 1-n or 0 - n. I hope that works.
Cheers!!!!
Umang Mathur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how about the value attribute?
you have to bind this to a context node attribute, which at least has one element created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is not with the input field, only with the checkbox. The input field is enabled and writable.
The check box checked and enabled properties are binded with two boolean node attributes.
Elements have been created for every attributes in the node, and true has been set for these two boolean attributes.
So now my check box is checked, since the node attribute has a true value. But I am still not able to uncheck then check the check box since it is read only !!
Hi,
You could not see the checkbox enabled it may be because you did not bind the value property of the checkbox with an attribute of data type boolean. As per your post it appears you are only binding the enabled property of checkbox with attribute.
Please try binding value property of the checkbox with an attribute your problem may get solved.
Let us know in case it do not work.
Regards,
Vivek
Hi Vivek,
I don't have any value property in my checkbox properties. The only properties I have are:
- id
- layoutData
- activateAccessKey
- checked: binded with a true contexte attribute boolean value
- contextMenuBehavior
- contextMenuId
- enabled: binded with a true contexte attribute boolean value
- explanation
- readOnly
- state
- text
- text direction
- tooltip
- visible
I am not using a checkbox group, and I am working on Netweaver Developer Studio 7.2. Maybe it does make a difference...
I think I am really missing something. I decided to delete all attribute values from the context and restart from scratch. So I created new attributes of boolean type, changing their name.
As a result, now I got one check box working, but not the others. So I went further and realized that every checkbox enabled property was linked to the same attribute value: isCheckBoxEnabled. So I set this property to true instead of binding it to a context attribute. And now everything is working just fine !!
Any comment on the mistake I made ? Maybe this post will help some other beginners trying to figure out why their checkboxes are not enabled !!
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.