Skip to Content
avatar image
Former Member

Addig a new row in a table in Ess/cats

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 09, 2009 at 08:05 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 09, 2009 at 08:06 AM

    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

    Add comment
    10|10000 characters needed characters exceeded