on 05-27-2005 3:19 PM
I have an input field marked read-only on a form. When I run the application, select the read-only field, press enter, then Save (validating action), I get a WebDynpro exception saying that I attempted to modify a read-only context attribute. This does not happen if I select the field and press other keys (such as characters)... only when I press enter. If I make the field disabled (instead of read-only), this error is avoided because I cannot even select the input field - but I would rather use read-only because it doesn't gray out the field at runtime. Is this a bug, or am I missing something?
-Dave
How do you marked the InputField as read-only? There is a "readOnly" property on the base interface IWDAbstractInputField. On the other side, if an InputField is bound to a context attribute that is read-only, then it also gets read-only.
You obviously have an action bound to the InputField.onEnter event. It seems to be a bug that this event is fired for read-only InputFields, I have to check this out.
In any case, if the InputField is disabled, the action is not triggered.
Please post the version (SP) you are using.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using sp11. The field that causes a problem is bound to a read-only calculated context attribute. I also set the read-only attribute on the input field UI element, but I don't have an onEnter action assigned to it. The problem occurs only when I put focus on the field, press enter, then subsequently press the Save button on my form (bound to a validating action). I can even modify other fields on the form before pressing the Save button, and the problem still occurs.
But you're right, if I disable the input field, the problem does not occur. I would rather it not be disabled though, simply because of the grayed-out appearance.
Thanks,
-Dave
Hi,
I tried working on your scenario. I tried both making the attribute as read only and also setting the input field as read only. In both the scenario the field grays out. So if you are trying to mark it as read only then I would suggest you to disable the field as all the other options too would give you the same result.
If your field does not gray out it means the field has not become read only yet.
Regards
Noufal
Hi David,
The problem is not with the input field. The attribute you are displaying in the input field is read only.
If its a read only attribute put in a text view and not in a input field.(Bcoz.. input fields are not primarily designed for displayin values..) :-)..otherwise u have to disable the input field...
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you select the inputField and press enter the OnEnter action of the inputField is being called.
When you disable the inputField it prevents you from entering values as well as accessing it actions also.
When you try to keep you context attribute as read only and keep the input field as enabled it is similar to trying to modify a read only attribute which is not permissible.
Hence the error.
Revert for further clarifications.
Message was edited by: Noufal Kareem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.