cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an element

Former Member
0 Kudos

Hi,

In a view controller I have declared a node and its cardinality as 0..1.

This node has an attribute name of type name1.

I am binding the Input field with this attribute.

When I execute this application the program is going for dump and on the browser I get the following message "Context Path DATA1.NAME Cannot Be Resolved (Last Node Is Empty) ".

To solve this I have gone wddoinit() of this view and created a element for node data1.

Node_Data1 = wd_Context->get_Child_Node( Name = IF_CARDINALITY_VIEW=>wdctx_Data1 ).

CALL METHOD NODE_DATA1->CREATE_ELEMENT

  • EXPORTING

  • STATIC_ATTRIBUTE_VALUES =

RECEIVING

ELEMENT = ELEM_DATA1.

CALL METHOD ELEM_DATA1->SET_ATTRIBUTE_NULL

EXPORTING

NAME = 'NAME'

.

Even then the problem is not solved.

Can you suggest me the possible way in this case.

Regards,

Nagaraju Donikena.

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_szcs
Active Contributor
0 Kudos

Hi Nagaraju,

You need to bind the element to the node by calling bind_element(). Currently, it's just created, but not yet part of the node.

Best regards,

Thomas

Former Member
0 Kudos

Hi Nagaraju,

Are you getting this error while trying to

a. read the value of attribute name1 or

b. create reference to name1 or

c. change the value of name1?

Please clarify.

Regards,

Haresh.

Former Member
0 Kudos

Hi,

Try this out.

Node_Data1 = wd_Context->get_Child_Node( 'NAME' ).

instead of

Node_Data1 = wd_Context->get_Child_Node( Name = IF_CARDINALITY_VIEW=>wdctx_Data1 ).

Regards,

<i><b>Raja Sekhar</b></i>