on 11-19-2007 6:49 AM
Hi experts ,
I am using a tree by table UI in which master. I want to know text of current selected element of table (which is one of the column of table ) . as table is dynamically expanding or collapsing upon expanding or closing master column.
so i used follwing code in do modify view to get it
IWDTable tab = (IWDTable) view.getElement("Table1");
tab.mappingOfOnLeadSelect().addSourceMapping("row", "element");
public void onActionOnrowSelect
(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int element )
{
//@@begin onActionOnrowSelect(ServerEvent)
//@@end
}
but above code also give me current row (an integer value) .
but its not solving my problem . as current row elemt is always not going to be same row in which table (data source for table).
can any body have solution ?
Regards
abhay
Hi Ayyapparaj
Thanks for your reply but can you please tell me code for feteching as when i am trying to use bellow code to fetch one column <b>Title</b> its giving exception as Unhandled exception type wdcontextexception.
wdContext.nodeCatalog().getTreeSelection().getAttributeAsText("Title");
Regards
Abhay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Try to set the initial lead selection to element 0
and use the following code
IWDNodeElement nodeElement;
try {
nodeElement = wdContext.nodeCatalog().getTreeSelection();
Object obj = nodeElement.getAttributeValue("Title");
} catch (WDContextException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
regards
Ayyapparaj
Hi Abay,
IWDTable tab = (IWDTable) view.getElement("Table1");
tab.mappingOfOnLeadSelect().addSourceMapping(IWDTreeNodeType.IWDOnLoadChildren.NODE_ELEMENT,"element");
datatype of the <b>element</b> should be <b>IWDNodeElement</b>
Or
You can use
IWDNodeElement IWDNode.getTreeSelection()
Ex: wdContext.nodeA().getTreeSelection()
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
yes i have datatype as IWDNodeElement and i am also getting current selected row as integer , but its not solving my problem as when i am trying to access the say nth element (which is actually not expanding or collapsing)
so which in turn giving me out of bound exception error .
kindly help ?
Regards
Abhay
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.