cancel
Showing results for 
Search instead for 
Did you mean: 

Addig a new row in a table in Ess/cats

Former Member
0 Kudos

Hello all,

I am working on Ess/cats application.

By default it is displying me 8 rows.I have to put a button to add a new row in the table.

but i could not find a way to add a new row.

Thanks and Regards.

Punit Pawar

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member40425
Contributor
0 Kudos

Hi,

In the onAction of button Add one more element in node which is bounded to the table. You can use following code.

public void onActionAddRow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionAddRow(ServerEvent)

	  IWDNodeElement element = wdContext.node<Node_Name>().create<Node_Name>Element();" Here Node_Name is the name of node which is bounded to your table.
	  wdContext.node<Node_Name>().addElement(element);
    //@@end
  }

I hope it helps.

Regards,

Rohit

Former Member
0 Kudos

Thanks for your quick reply.

But this will not work in case of Ess/cats.

Regards.

Punit Pawar

Former Member
0 Kudos

Hi,

To add a new row write the code in action method of button

IPrivate<viewname>.I<node name>Element ele=wdContext.create<node>Element();
wdContext.node<name>.addElement(ele);

here node name is the node which is binded to the table datasource.

Regards,

Srikanth