on 07-03-2007 10:14 PM
Hi All,
I would like to copy the elements from my Flight_List node to the OVSAirportQueryOutput node and map them after that, how can I do that? They have totally different elements.
I'm working on the OVSAirportContextNotificationListener and try to put the code into the onQuery(IWDNodeElement, IWDNode). Please tell me how to do this, and I would greatly appreciate that.
Regards,
-Napadol
Hi,
Use this code in wdDoInit();
{
IWDNode srcNode = (IWDNode)wdThis.wdGetFlightCompController().wdGetContext().nodeFlight_List();
IWDNode destNode = (IWDNode)wdContext.nodeFlight_Sorted();
WDCopyService.copySubtree(srcNode,destNode);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for your responses and sorry for the late response. I did try all of your solutions, but since I am still new to the web dynpro it gave me all the errors such as "Invalid expression as statement." I have never use the IWDCopyService before, so I don't know where to place the codes in.
Actually, I am working on the Object Value Selector (OVS), but my task is to add another advance search for the airport. I added the airport name, airport city, and country in the view layout, and I also added OVSAirportContextNotificationListener in the OVSCust (Customer Controller). When I deploy and run the app., it gives me the airport advance search table to fillout the airport code. But when I clink on Go button after putting "JFK" or anything for the airport code, it shows me a blank hit list. I don't know where are all the information. Any suggestions?
Regards,
-Napadol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
If source node elements and destinationnode elements are same then WDCopyService will work
WDCopyService.copyElements(sourceNode,targetNode);
Otherwise you have copy manually from src to destination using for loop.
for(int i=0;i<Flight_List.size();i++)
{
// set the OVSAirportQueryOutput node elements
}
-SS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Napadol,
Try this Code
<b>IPrivate<View>.I<SourceNode>Node sourceNode=wdContext.node<SourceNode>();
IPrivate<View>.I<TargetNode>Node targetNode=wdContext.node<TargetNode>();
WDCopyService.copyElements(sourceNode,targetNode);</b>
Regards
Satish Kumar SV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.