cancel
Showing results for 
Search instead for 
Did you mean: 

checkbox in TreeByNestingTableColumn

Former Member
0 Kudos

Hi Experts,

I am using a table that has one column.

Column contains TreeByNestingTableColumn.

In master column I am using check box.

My structure of master column is as follows

check box (parent)

checkbox(child)

-


-


I have following questionss.

1)I want to select all child check box when i click on parent check box without selecting row of table.

2)I want to traverse through table when I click a button like save

that is present in view where table is.

Kind regards

Sarsij

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Tatayya ,

I am always getting element object as null in onActionChecked method.

Kind Regards

Sarsij

Former Member
0 Kudos

May be u missed the below code in wdModify() method

public static void wdDoModifyView(IPrivateAdminMenuAppView wdThis, IPrivateAdminMenuAppView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

if (firstTime) {

IWDTreeByNestingTableColumn masterColumn =

(IWDTreeByNestingTableColumn) view.getElement("MasterColumn1");

masterColumn.mappingOfOnLoadChildren().addSourceMapping("path", "element");

}

}

I hope it solve your problem. Let me know if you have any problem

Thanks

Former Member
0 Kudos

Hi,

Thank you very much.

Error was coming because I had forgotten to add following code.

IWDCheckBox checkBox=(IWDCheckBox)view.getElement("CheckBox");

checkBox.mappingOfOnToggle().addSourceMapping("ckecked", "ckecked");

checkBox.mappingOfOnToggle().addSourceMapping("nodeElement", "nodeElement");

Kind Regards

Sarsij

Former Member
0 Kudos

Hi,

Go through this link

http://help.sap.com/saphelp_nw04/helpdata/en/24/4e70c63574ec4284d0f47324ab2d0e/frameset.htm

go to the tutorial part and check the tutorial

for Integration of a Tree Structure in a Web Dynpro Table

Thanks & Regards

Padma N

Former Member
0 Kudos

1. write an Action event handler and pass the extra parameter Table node elementy type

2. write a method to get the child check boxes to select/deselect

3. Find the below code

public void onActionChecked(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.info.wdp.IPrivateAdminMenuAppView.IMenuElement element )

{

getChildId(element,element.getChecked());

}

public void getChildId(com.info.wdp.IPrivateAdminMenuAppView.IMenuElement element,boolean checked)

{

int size=element.nodeSubMenu().size();

if(size!=0)

{

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

{

element.nodeSubMenu().getMenuElementAt(i).setChecked(checked);

getChildId(element.nodeSubMenu().getMenuElementAt(i),checked);

}

}

}

I hope it will help you

Thanks