cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add Elements

Former Member
0 Kudos

Hi,

I am new to Web Dynpro. I have one question.

How to add elements to a value node at runtime? Can you please provide me the answer.

Thanks,

Kumar. K

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Kumar,

There are several options:


(a)
  inside of a supply function via
  node->bind_table( my_itab ).

(b)
  my_new_element = my_node->create_element( ).
  my_node->bind_element( my_new_element ).

(c)
  by using any other the other bind_* methods

Best regards,

Thomas

Former Member
0 Kudos

Hi

put the follwing steps

I<Node>Element e = node.create<Node>Element();

node.addElement(e);

Regards

Dhinakar J

Answers (1)

Answers (1)

sridhar_k2
Active Contributor
0 Kudos

Hi Kumar,

In the wdDoModifyView - method. You can create Elements dynamically.

if(firstTime){

IWDTextView textview1=(IWDTextView)view.createElement(IWDTextView.class,"textview");

textview1.setEnabled(true);

textview1.setText("Dynamic created Textview");

con.addChild(textview1);

IWDLabel label3=(IWDLabel)view.createElement(IWDLabel.class,"label11");

label3.setText("hi");

con.addChild(label3);

}

Regards,

Sridhar