Hello everybody!
We're currently trying to implement a generic export from WebDynpro tables to Excel files using a faceless WebDynpro DC as described here. The main functionality works fine, but I have to explicitly define the context node (IWDNode instance) I want to export data from. To make the functionality more convenient, I'm trying to get the context node directly from the table's dataSource mapping. I can get the path to the node using
IWDTable table = (IWDTable)view.getElement(tableName);
String dataSourceNodeName = table.bindingOfDataSource();
but I cannot see a way to get the actual node (IWDNode instance) that I'll have to pass to the exporter, regardless of elements being present or not inside that node.
wdContext.currentContextElement().node(dataSourceNodeName);
does not work as expected (it returns null), and
wdContext.getChildNode(dataSourceNodeName, IWDNode.LEAD_SELECTION);
returns null, too. Do you know of any working way to retrieve the actual node from it's path or name or, even better, from the IWDTable element itself?
Thanks
Michael