cancel
Showing results for 
Search instead for 
Did you mean: 

How to add multiple records in table thru form via Submit button

Former Member
0 Kudos

Hi all

i have small requirement as follows.

i have a view in which i have 3 UI elements one is webdynpro form,Table UI element and third one is submit button.

now at runtime when i will enter the details in the form and click on the submit button then those record details has been stored in Table. then next time again when i submit the form with details then the table contains all records of current and existing ...so table has to maintain mutile records thru form via submit form..

i need sample code on the same.

points are always rewardable

Thanks

Sunil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Create one context attribute and map it to the Inputfiled and one submit button, create a node with a valueattribute map it to a Table and in onActionsubmit write this code

public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionsubmit(ServerEvent)

String str=wdContext.currentContextElement().getInputfiledattribute();

IPrivateTableformView.ITablenodeNode node=wdContext.nodeTablenode();

IPrivateTableformView.ITablenodeElement ele=node.createTablenodeElement();

ele.setNodeattribute(str);

node.addElement(ele);

//@@end

}

thanx,

ramani.p

Answers (0)