on 05-18-2009 12:24 PM
Hi!
I'm trying to do a web dynpro application that displays in a popup the result of a research.
Thus, I have:
- main_view embedded to main_window
- popup_view embedded to popup_window
In main_view, I have an input field where the user can enter a string. After clicking on the "search" button, the popup has to appear showing all matches corresponding to the user research.
In need to pass the parameter of the input field from main_view to popup_view but don't know how to do it.
Thanks for any help you can provide.
C.
Edited by: Cristina CHEN MA on May 18, 2009 1:24 PM
Hi Cristina,
Check this Blog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Thanks a lot for your answers 😃 I managed to pass the input field!
I tried to do the same thing with a table... but seems that it's not the same...
When creating a node in the context, I can only choose a structure. I've seen that the node has to have the cardinality set to 0...n, but it changes nothing.
Any clues?
Thanks again.
C.
Hi,
Yes the node has to be of cardinality 0:n .To read the contents of the table use the following code.
Data: l_node type ref to if_wd_context_node.
Data: itab type if_viewname=>elements_nodename. "viewname is your view name
l_node = wd_context->get_child_node( 'NODENAME' ).
l_node->get_static_attributes_table( importing table = itab ).
Hope this helps!
Regards,
Radhika.
Hi,
If you defined any node with cardinality 0..N or 1..N then its a tabular data and you can use it inside your view as any other node. To display data in the node with cardinality 0..n you will need a TABLE UI element in the view and then bind the data source to the node(0..n).
If you could be more specific in your requirement then it will help us.
Thanks,
Abhishek
Thank you both for your time.
TO: Radhika Vadher
I tried your solution but I get an error message when using
lo_el_tresult->get_static_attributes_table
=> method unknown, protected or private
I used the wizard to get the node's attributes:
DATA : lo_nd_tresult TYPE REF TO if_wd_context_node,
lo_el_tresult TYPE REF TO if_wd_context_element,
ls_tresult TYPE wd_this->element_tresult.
* navigate from <CONTEXT> to <TRESULT> via lead selection
lo_nd_tresult = wd_context->get_child_node( name =
wd_this->wdctx_tresult ).
* get element via lead selection
lo_el_tresult = lo_nd_tresult->get_element( ).
* get all declared attributes
lo_el_tresult->get_static_attributes(
IMPORTING
static_attributes = ls_tresult ).
But I still have an error message:
ls_tresult is not an internal table "OCCURS n" specification is missing
Thanks again for any help you can provide 😃
C.
Hi,
You need to use the method get_static_attributes_table of if_wd_context_node.
" lo_el_tresult is the element you need to use the node
lo_el_tresult->get_static_attributes_table
=> method unknown, protected or private
Use this code.
* navigate from <CONTEXT> to <TRESULT> via lead selection
lo_nd_tresult = wd_context->get_child_node( name =
wd_this->wdctx_tresult ).
lo_nd_tresult->get_static_attributes_table( importing table = itab ).
Regards,
Radhika.
Edited by: Radhika Vadher on May 19, 2009 3:54 PM
Cristina,
You can ideally create a node say INPUT_NODE in the COMPONENTCONTROLLER and inside it you can have the user input field as an attribute. Use context binding to make it available to your MAIN_VIEW context and then bind the attribute to the input field UI element of the MAIN_VIEW.
The COMPONENTCONTROLLER is the global entity and hence all the context element defined here will be available to all the Windows and Views .
Thanks,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
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.