on 04-01-2009 1:43 PM
Hello Friends,
I am facing a problem, which could be very simple, and I am just not comming to the point,
Thing is I have a view which contains TABS ( 3 e.g) each tabs then furhter contains views etc.. ( all views sharing the same controller)
I have a node in controller Notif_con ( car 1:1 ) which contains a node selected_notifs ( car: 0:n ) which contains two attributes ( notif_no and notif_typ)
From 1st view i mapped the node notif_con in view's own context and set the selected_notfs attributes like following:
CALL METHOD lo_nd_notification_detail->get_selected_elements
EXPORTING
including_lead_selection = ABAP_FALSE
RECEIVING
set = lt_set.
lo_nd_notif_conv = wd_context->get_child_node( name = wd_this->wdctx_notif_conv ).
lo_el_notif_conv = lo_nd_notif_conv->get_element( ).
lo_nd_selected_notif_nos = lo_nd_notif_conv->get_child_node( name = wd_this->wdctx_selected_notif_nos ).
LOOP AT lt_set INTO ls_set.
* retrieve selected notif no.
CLEAR lv_notif_no.
CALL METHOD ls_set->get_attribute
EXPORTING
name = 'NOTIF_NO'
IMPORTING
value = ls_notif_no-notif_no.
" APPEND ls_notif_no TO lt_notif_no.
CALL METHOD ls_set->get_attribute
EXPORTING
name = 'NOTIFICATION_TYPE'
IMPORTING
value = ls_notif_no-NOTIFICATION_TYPE.
APPEND ls_notif_no TO lt_notif_no.
ENDLOOP.
lo_nd_selected_notif_nos->bind_table( lt_notif_no ).
CALL METHOD lo_nd_selected_notif_nos->get_element_count
RECEIVING
count = size.
if I check the size it has few elements, things works fine.....
in my second view I read the node and retrieve the elements...like this:
lo_nd_selected_notif_nos = wd_context->get_child_node( name = wd_this->wdctx_selected_notif_nos ).
lo_el_selected_notif_nos = lo_nd_selected_notif_nos->get_element( ).
lo_el_selected_notif_nos->get_attribute(
EXPORTING
name = `NOTIFI_TYP`
IMPORTING
value = lv_notification_type
).
Things works fine so far.....
Now I want to have same via third view as well, so on particular action I set the values of selected_notif ( which is here also mapped via controller ) like this:
navigate from <CONTEXT> to <NOTIF_CONV> via lead selection
lo_nd_notif_conv = wd_context->get_child_node( name = wd_this->wdctx_notif_conv ).
navigate from <NOTIF_CONV> to <SELECTED_NOTIF_NOS> via lead selection
lo_nd_selected_notif_nos = lo_nd_notif_conv->get_child_node( name = wd_this->wdctx_selected_notif_nos ).
ls_selected_notif_nos-notif_no = notif_no.
ls_selected_notif_nos-notification_type = notif_typ.
append ls_selected_notif_nos to lt_selected_notif_nos.
lo_nd_selected_notif_nos->bind_table( lt_selected_notif_nos ).
CALL METHOD lo_nd_selected_notif_nos->get_element_count
RECEIVING
count = size.
when i check the size value is set........and I assume the controller is filled with the value and so the 2nd view..... and afterwards when i go to the 2nd view again via same coading ( paste above for the 2nd view ) the element is initial .........
I have no idea whats going on, pls note there is no refresh to node somewhere......
my question is cant i fill the context node of controller which is mapped in two views ? and access it in same view ?
hope you can provide me with nice tips ....
Regards,
Edited by: Shah H on Apr 1, 2009 2:46 PM
Hi Shah,
As far as i can see You are binding the node twice in different views.
I am not able to understand that when all 3 views share same controller node then why are you binding it again.
I see this as the trouble-causing thing.
I am not fully sure but request you to check.
Regards,
Sumit Oberoi
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 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.