on 08-30-2004 3:31 PM
Hi
If I click on a TreeItem, my Event Handler method get's the path information for the selected context element like
"IOCG.TreeUIView.Customer.1.Order.0.OrderItem.2"
How do I transfer this String into an context element?
(of type IWDTreeItemType Element)?
Thanks
Raphael
Hi Raphael,
Try the following:
1. Declare parameter (say, selectedItem) in action handler as subtype of IWDNodeElement. You can use concrete interface generated for your context node in view controller, smth. like <package>.IPrivate<ViewName>.I<NodeName>Element, i.e. IOCG.IPrivateTreeUIView.IOrderItemElement.
2. in wdDoModifyView add the following code snipet for mapping:
if (firstTime)
{
final IWDAbstractTreeNodeType tiOrderItem
= (IWDAbstractTreeNodeType)view.getElement
(
"MyTreeItemID"
);
tiOrderItem.mappingOfOnAction()
.addSourceMapping("path", "selectedItem");
}
WBR,
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I have a similar ptroblem - I have a master column in a table, that expands like a tree. Is it possible to use <b>mappingOnOfLoadChildren</b> to find the path for the selected node?
What type should it be the corresponding argument in onLoadChildrenAction(...) method?
I'm novice in Webdynpro, please excuse me if the question is not so smart.
Regards
KM
Hi,
I think, I found it out - it works in the same manner
In <b>doModifyView()</b> I used <b>IWDAbstractTreeTableColumn</b> instead of <b>IWDTreeNodeType</b> to get reference to UI element.
<b>IWDAbstractTreeTableColumn masterColumn =(IWDAbstractTreeTableColumn) view.getElement("MasterColumnID") ;</b>
After that I just mapped <b>"path"</b> argument to Action argument <b>"selectedElement"</b> by
<b>masterColumn.mappingOfOnAction().addSourceMapping( "path", "selectedElement")</b>
And in onActionLoadChildren I added argument <b>selectedElement</b> of type - Context Element that builds tree.
Best regards
KM
One remark concerning the event parameter names used in parameter mapping:
In NW04, you can find the event parameter names in the Javadoc for the event in the UI element API and must use a string literal like "path" in the parameter mapping.
In NW05, there will be a constant definition in the UI element API for each event parameter.
Regards, Armin
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.