on 05-04-2009 11:51 AM
Hi ALL,
I am new to WD.I have created a WDA with two views.1st view have selection screen 2nd view displays the details.I have placed a back buttom in 2nd view and used pulgs to go back to 1st screen.
But when come back to 1st screen the selection screen is not geting refreshed.Can any one explain how to clear the selection screen in the first view when i press the back button in 2nd view.
In the OnAction method of your back button, invalidate all your nodes that is bound to the selection screen.
Data: l_node type ref to if_wd_context_node.
l_node = wd_context->get_child_node( 'NODENAME' ).
l_node->invalidate( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anusha,
Here you need to understand and keep two things separate. One is the view and the other the context.
You use the context node and its attributes to display the data using the UI Elements in the View. So unless you change the value or write some code to change the value, the values will remain the same.
Therefore, the context is the one which holds the data. In your case, you have defined a node in the component controller. You have used this node to map with ui elements which form the Selection screen.
Now even though you are going to a different view and coming back, you have not done anything to change the values which are stored in the node and its attributes.
Hence, like Radhika suggested before you can make use of the invalidate( ) method of the interface reference if_wd_context_node.
Regards,
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go to the properties tab of first view and change property lifetime as when visible.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
I have tried your solution of making the lifetime tab to whenvisible.But its not working.
Any way i got the solution.
In the on action method of your back button invalidate all your nodes that is bound to the selection screen.
Data: l_node type ref to if_wd_context_node.
l_node = wd_context->get_child_node( 'NODENAME' ).
l_node->invalidate( ).
hi,
On you Backward navigation invalidate the node <lo_nd>.
lo_nd = wd_context->get_child_node( ' NAME' ). 'Name is Context Node binded to your fields.'
lo_nd->invalidate( ).
or if you have to set the particular Attribute as null. Use this :
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
get element via lead selection
lo_el_context = wd_context->get_element( ).
get single attribute
lo_el_context->set_attribute_null(
EXPORTING
name = `ABC` "ABC is the name of attribute ).
Thanx.
Edited by: Saurav Mago on May 4, 2009 4:36 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.