cancel
Showing results for 
Search instead for 
Did you mean: 

"Select All" "Deselect All" Operations in Table Data

Former Member
0 Kudos

Could anyone provide information on implemntation of "Select All" , "Deselect All" Operations for web dynapro java application

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Take one contexvalue attribute 'selecetd' of type boolean in the <TableNode>

Take one checkbox as column of the table and bind it's 'checked' property to

context attribute 'selected'

Initially set the boolean value to false

the in onToggle action of checkbox, write following code

For select All ACtion

for(int i=0;i<wdContext.node<TableNode>().size();i++)

{

wdContext.node<TableNode>().get<TableNode>ElementAt(i).set<context attribute>()(true);

}

For DeSelect All ACtion

for(int i=0;i<wdContext.node<TableNode>().size();i++)

{

wdContext.node<TableNode>().get<TableNode>ElementAt(i).set<context attribute>()(false);

}

Regards

LakshmiNarayana

Former Member
0 Kudos

Hi LakshmiNarayana ,

1) IS it that i have to add one more colum with chkboxes as Column value to my table and

2)To create a new context value as selected inside my table

2)which action i have to toggle to my chkboxes of tablecolum means Select or Deselect

Can u plz clarify my dout

Regards

Padma N

Former Member
0 Kudos

Hi,

I actually mean it in actions of Buttons or LinkToAction UI Elements

which will select or deselect all the rows of a table

Sorry for not mentioning this..

Regards

LakshmiNarayanaChowdary.N

Former Member
0 Kudos

Hi Raghu,

Use an action button as "Select/Deselect" in its action write the following code it will surely work..

IPrivateAppView.IAppListNode node= wdContext.nodeAppList();

int size = node.size();

boolean flag = wdContext.currentContextElement().getSelected();

if(flag == false){

for(int i = 0; i < size; i++)

{

wdContext.currentContextElement().setSelected(true);

node.getAppElementAt(i).setIsSelected(true);

}

}

else{

for(int i = 0; i < size; i++)

{

wdContext.currentContextElement().setSelected(false);

node.getAppElementAt(i).setIsSelected(false);

}

}

Regards,

karthik

Former Member
0 Kudos

Hi Raghu,

Chk this link

Arun

Former Member
0 Kudos

Hi Raghu,

Are u using check boxes in u table?

Arun

Former Member
0 Kudos

Yes it is planned to have checkbox in the table .