on 07-20-2011 8:01 AM
Hello,
I'm using a context node (TABLE_NODE) representing different people to fill a table element with.
In this context node there are subnodes storing information for an image and comment.
I have an image UI element that is bound to this subnode and a text input element bound to the other subnode.
Under some circumstances this main table (TABLE_NODE) has no entries. Therefore the child nodes doesn't exist and I get an error message like the following.
■The following error occurred in system XYZ : Adapter error in INPUT_FIELD "COMMENT_INPUT_FIELD" of view "VIEW": Context binding of property VALUE cannot be resolved: Node VIEW.1.TABLE_NODE does not contain any elements
To avoid this error, I check (in WDDOMODIFYVIEW) the state of TABLE_NODE and release the binding of the image (image->bind_source( '' )) and of the text input (text_input->bind_value( '' )). While this works perfectly for the image element, the text input gives another error:
■The following error occurred in system XYZ : Access via 'NULL' object reference not possible.
Debugging of this error leads into deep areas of SAP-code.... this error definitly come from the text input, because setting this element to invisible avoids the error and the application is working again.
Is there anything I've overseen or what can I do to get this work?
Best regards,
Michael
Hello Michael,
the InputField always expects a binding value and the corresponding context element should exists. otherwise it wont work. In your case for the Inputfield you have removed the binding. thats the reason you dump
if you want the Inputfield to be displayed then you need to make sure that its bound to an context attribute and context element should exist for the same.
easy way is to change the cardinality of both TABLE_NODE and SUB_NODE to 1..1.
Otherwise you have an option of creating the SUB_NODE instance or hide the input field if the sub_node has no instance.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cardinality of table_node is 0..n (with selection 0..1).
The image childnode is cardinality 0..1 and the comment child node is cardinality 1..1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is the cardinality of table_node? I think you set the value to 1: 1 or 1:n, try to make 0:N and check now.
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.