on 12-24-2010 10:00 AM
Hello Experts,
In my WD application, there are two views : VIEW1 and VIEW2.
When I Click on 'Button1' from view1, it goes to the view2 using navigation plug. On view2, there are two buttons namely 'ADD' and 'Cancel' and one table(Items) .When user clicks on 'ADD' button, I am adding record to the table. and when user clicks on 'Cancel' button I am navigating back to the view1.
Before firing navigation plug to the view1, I am clearing the contaxt node binded to the Item table but still when I again press Button1 from view1, the records are present in the table (Items).
When user clicks on 'Cancel' button from view2, item table should be cleared so that when user press button1 (View1) again, he should see blank table.
Could you please help me finding the reasons behind this behavior?
Thanks,
Prashant
Hi,
Hope you get records from database table.
After you add the contents/cancel the contents, are you updating the database table also?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How are you clearing the code . can you paste the code here ..
and where are you clearing it .
you need to right the code for clearing the table in the on click event handler of cancel button of view 2 or you can also
write it in event handler of the inbound plug of view 1 when it comes from view 2.
thanks
Sarbjeet Singh
Hi sarbjeet,
I am clearing it on the click event handler of cancel button with following code
DATA: lo_nd_zitemtable TYPE REF TO if_wd_context_node.
DATA: lo_el_zitemtable TYPE REF TO if_wd_context_element.
DATA: lt_zitemtable TYPE TABLE OF z1063f.
lo_nd_zitemtable = gr_view_context->get_child_node( name = 'ZITEMTABLE' ).
* get element via lead selection
lo_el_zitemtable = lo_nd_zitemtable->get_element( ).
lo_nd_zitemtable->get_static_attributes_table(
IMPORTING table = lt_zitemtable ).
CLEAR lt_zitemtable.
lo_nd_zitemtable->bind_table( new_items = lt_zitemtable
set_initial_elements = abap_false ).
Thanks,
Prashant
hi,
you can use the invalidate property of IF_WD_CONTEXT_NODE to refresh the node only refreshing or clearing the internal table wont do.
so first you create an object for IF_WD_CONTEXT_NODE and using that object you can call invalidate. this will refresh your node.this thing is to be done in the coding of the cancel button.
hope this maybe precise and help you
thanks and regards,
sahai.s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.