cancel
Showing results for 
Search instead for 
Did you mean: 

Read Values from ModelNode

Former Member
0 Kudos

Hi,

I need to read values from one of the model node and add a new element to it ? Can anyone tell by using the loop how can i read values from that model node ?

thanks

Jyothi.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Please use the following link, previous link does not work:

Former Member
0 Kudos

Hi,

for example Modal is modal node and table is value node ,

you can set the values like this...

IPrivate<name>View.ITableNode iTableNode = wdContext.nodeTable();

IPrivate<name>View.ITableElement iTableElement;

IPrivate<name>View.IModalNode iModalNode = wdContext.nodeModal();

IPrivate<name>View.IModalElement iModalElement

for(int i=0;i<iModalNode.size();i++){

iModalElement = iModalNode.getModalElementAt(i);

iTableElement = iTableNode.createTableElement();

iTableElement.set<attributes>();

..........

iTableNode.addElement(iTableElement);

iTableNode.moveNext();

}

Regards,

ramesh

Former Member
0 Kudos

Hi,

I am unable to get it, what is the code for reading the values from that model node. I need to read the values from that node where the node is having 12 elements ( records ).

can anyone give me the code.

thanks

Jyothi.

Former Member
0 Kudos

I tried the following code, but ! it is showing error.

IPrivate<name>View.IModalNode iModalNode = wdContext.nodeModal();

IPrivate<name>View.IModalElement iModalElement

.

thanks

jyothi.

Edited by: Jyothi Rama on Oct 8, 2008 2:46 PM

Former Member
0 Kudos

hi!

use this for loop to get read your node.

for(int i=0;i<wdContext.nodeTable.size();i++)

{

IPrivate<name>View.ITableNode iTableNode = wdContext.nodeTable();

IPrivate<name>View.IModalElement element;

element.getModalElementAt(i);

}

thanks

vishal

Former Member
0 Kudos

Hi,

Reading the model node is similar to the normal value node

Generally the output would be under your main model node-->output and you might have a structure wherein you would have the output node holding the result

for(int i=0; i<wdContext.node<model_node_to_be_read>.size();i++)

{

IPublic<componentname>.I<model_node_to_be_read>Element ele = wdContext.node<model_node_to_be_read>().current<model_node_to_be_read>Element();

String value = ele.get<attribute>();

}

Regards,

Murtuza

Former Member
0 Kudos

Hi

Hope this forums links is helpful for you

Regards

Ruturaj

Former Member
0 Kudos

Hi Jyothi,

Please follow the SDN link:

https://www.sdn.sap.com/irj/sdn/forums