on 08-01-2006 6:48 AM
Hi,
I have a webdynpro table and have buttons in one of the columns. I need to retrive the index of the row or button on click of the button. How can i do that? Any help
regards,
Sujesh
sujesh,
1. If your Table has no property compatabilityMode (check on UI designer in IDE), then every event occurs on lead selected element, you may get its index in action event handler like:
wdContext.node<NameOfNodeThatIsTableDataSource>().getLeadSelection();
2. Otherwise add parameter "row" of Java type IWDNodeElement to action, then add following to wdDoModifyView:
if (firstTime) {
final IWDButton btn = (IWDButton)view.getElement("id-of-button");
btn.mappingOfOnAction().addSourceMapping("nodeElement", "row");
}
Then in action event handler you may just use row.index();
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Try this,
Create a node element in the node.And bind the number of row to the element.At runtime you can get the number by retriving the lead selection method.
int num=wdContext.current<Tablenode>Element().get<NUmberParam>();
Kind Regards
Mukehs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.