on 02-28-2008 5:10 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lokesh,
Changing the cardinality of the node XXP to 1:1 from 0:1 should resolve the issue.
Regards,
Sravan Varagani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.