cancel
Showing results for 
Search instead for 
Did you mean: 

Basic TableUI element to Reset Data in WEbDynPro For Java

Former Member
0 Kudos

Hi Experts,

I am new to webdynPro for java . Can anybody plz help me out.

i wrote the following code to retrieve data from DB. which is working very much fine.

public void

onActionGetRecords(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

while(rs.next()){

tabstrip.comp.wdp.IPrivateSearchEmployee.IEmpDetailsElement elt= wdContext.nodeEmpDetails().createEmpDetailsElement();

elt.setSNo(rs.getString(1));

elt.setName(rs.getString(2));

elt.setPlatform(rs.getString(3));

elt.setPhNo(rs.getString(4));

elt.setCity(rs.getString(5));

wdContext.nodeEmpDetails().addElement(elt);

}

}

Now my problem is when i call this action its adding the rows to Table UI elements.

Can anybody please help

how to reset values in TableUI element when i click on reset button OR when i call onActionGetRecords(-----) methods,

Please help me .....

thanks and Regards,

Shashikiran

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Use the following code



wdContext.nodeEmpDetails().invalidate()

Regards

Ayyapparaj

former_member201361
Active Contributor
0 Kudos

hi,

if you want the data to be erased(reset)

in your code

tabstrip.comp.wdp.IPrivateSearchEmployee.IEmpDetailsElement elt= wdContext.nodeEmpDetails().createEmpDetailsElement();

elt.setName("");

elt.setPlatform("");

elt.setCity("");

wdContext.nodeEmpDetails().addElement(elt);

by this way you can reset all the values present in the table

and can you make it more clear for on action getrecords

or you acn use the remove method to remove the table element

wdContext.nodeXXX().removeElement();

thanks and regards

fazal

Edited by: fazal ahamed on Apr 2, 2008 4:10 PM