cancel
Showing results for 
Search instead for 
Did you mean: 

string data to display

lokesh_kamana
Active Contributor
0 Kudos

Hi,

i have some data in a variable str.

I want to display the variable and see the data in the view.

for that purpose i have takene a node 'XPP'.

and a variable 'X!'

And binded this attribute to a text area.

in my doinit method.

The code i have written is

node type ref to IF_WD_CONTEXT_NODE.

node = wd_context->GET_CHILD_NODE( 'XPP' ).

node->SET_ATTRIBUTE ( NAME = 'X1' VALUE = str )

But it is showing the error startcontext->XPP does not contain any elements.

PLease say me what the mistake i have done.

Its urgent.

Thanks in advance.

Lokesh.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Lokesh,

Follow these steps :

1. You need to naviagte till the node 'XPP'.

2. Then you need to create a node element for the same.

3. Assign value to the attribute of the node element

4. And then add or bind the element to the node.

You will get the desired results.

Changing the cardinality will just make sure that the number of data elements are in between the range(cardinality) specified.

For your problem you need to create a node element and then set the attribute value.

Regards,

Pragya.

Former Member
0 Kudos

Hi Lokesh,

Change the cardinality of XXP to 1:1 or 1:N.

So in this cases the System will create the Default Element.

Supply function also plays a Major Role Here.

<i> .Cardinality 1:1, no supply function => system adds a default element to the node

[ii]. Cardinality 1:1, supply function => system does not add default element to the node, the supply function is expected to supply this element.

Thanks.

former_member515618
Active Participant
0 Kudos

Hi Lokesh,

Changing the cardinality of the node XXP to 1:1 from 0:1 should resolve the issue.

Regards,

Sravan Varagani

Former Member
0 Kudos

Hi lokesh kamana ,

since you are tring to bind the value for the first time. First create and element for the node and bind values to that element.

Regards

Sarath

Yashpal
Active Contributor
0 Kudos

Hi ,

I think the cardinality of the node is 0....1 ..make it 1....1 , by default a element will be created for you .

Regards

Yash