on 01-08-2008 11:18 AM
Hi
I have two views . one view contains input fields and the second contains a table which shows the result. I have a button in the first screen to trigger an action. now in the context of the first view I have two elemsnts and in the context of the second view I have the table node. In the action method of the button how do I access the table node of the second view. Or How do I access the two input elements in the first view in the methods of the second view. Both input fields and the table node exist in the cotext of the componentcontroller.
please advice.
thanks
sankar
Hi snakar rao ,
You can move forward in three ways
1. on the button trigger of is view, using the code wizard you can read the input fields. and based on these values you can write logic to fetch data for the table node. once the data for the table node is fetched, you can bind the data to the table node
then write code for firing the outbound plug whixh is connected to the second view.
in this case you need to map both the nodes from component controller to view1.
2. on the action of button write code for firing the outbound plug whixh is connected to the second view.
then in wddoint of second view read the node thats mapped to the input field,and based on these values you can write logic to fetch data for the table node. once the data for the table node is fetched, you can bind the data to the table node.
in this case you need to map both the nodes from component controller to view1.
3. Best and Recommended
Create a method get_data in component controller
inside this method read the nodes thats binded to the input field,and based on these values you can write logic to fetch data for the table node. once the data for the table node is fetched, you can bind the data to the table node.
then on the button action of first view or on the do init of second view call this method.
Regards
Sarath
Edited by: Sarath Satheesan on Jan 8, 2008 12:29 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sankar.......
you have something called component controller. this acts as a global variable.
what you have to do is:
create the nodes for the input fields and the table in the component controller.
goto view 1 and drag the the node from teh component controller to thid view's context. now it is mapped.
the same for view2.
so at runtime you can read the values from these nodes and the values will be auto matically passed.
check this tutorial:
[tutorial|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943 - ]
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
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.