on 03-31-2010 4:10 AM
Hi Experts,
I am trying to use Freely Programmed search help for calling a custom WD component on pressing of F4 of an input field.
I have done everything required and the component is being called properly as well.
The issue here is that i need to pass two values to the the custom WD component on F4. As suggested in one of the threads I used F4_CONTEXT_ELEMENT to get the reference of the source context node and attributes. But the problem is that this gives reference to only that node which has the input field with F4 help (which is being used to call the custom component). The values which i need to pass are present in some other node.
Can you please suggest a way of accessing the other node to retrieve and use the values in the custom component called?
Regards,
Ritvik
Edited by: Ritvik Prasad on Mar 31, 2010 5:16 AM
Hi Ritvik,
the F4_CONTEXT_ELEMENT from the listener object should give you a reference to the element that was used for the F4.
If the other node is in the same context, you should be able to navigate up from the referenced element and up the context and back down again -
get_node from the element to the node, GET_PARENT_ELEMENT for the node to find a reference to its parent (possibly the root context. Given that I'd guess you'd know the structure of your context, once you were at the top, you could then use get_child_node, get_element, (possibly repeatedly) to get to the part of the context you are interested in.
Sounds like fun!
good luck,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
The logic worked. It was brilliant. I found the node and that node reference had the method get_parent_element. i drilled down to that. Using that parent element I got to the node which had my value and got the attribute value.
Thank you so much for this.
Hi Manas,
I will try your method as well and see if that works. Thank you so much for your inputs too.
Regards,
Ritvik
Hi
You can create other attributes in your Value Help Reuable Component Context Node (whic is marked as interfac node ) which you want to receive additionaly, and then you can copy the data from other node attributes to the newly created attributes in your value help mapped interface node ( for which have reference F4_CONTEXT_ELEMENT )
Hope this helps.
Regards
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manas,
Thanks for the suggestion. I had thought about it too. But the problem that i faced was that no event is triggered/Method called on pressing of F4 on that input field (its internally handled in the framework). In that case what should be the method/event where i should copy the values from the other node to the new attributes created so that it reflects in the Custom component?.
If you could just elaborate on that it would be really helpful.
Hi Chris,
Thanks a lot for this. That actually sounds like fun. I tried looking for options to do that. Although i can get to the node from the element using "GET_NODE" but there I could not find the method "GET_PARENT_ELEMENT" to get the parent element (context as you said). Is there any other method which could possibly return the parent element which i could eventually use to get to the other node.
It would be great if you could help out with this.
Thanks ,
Ritvik
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.