on 10-18-2007 8:42 PM
Hello WDA experts,
I am creating a simple application to create 2 views. 1 Input and othe output view. I created Input view and able to get the input fields and do further selections in some strucutres in the method. Now I want to pass these values to output view fields. Where should I do the coding and what interface is to be used? Some coding clue please.
Thanks
Prasad
hi prasad..........
Consider you are having two views, view1 and view2.
You want to pass a value from view1 to view2.
Have an input field in view1.
Create a node in the component controller.
create an attribute in that node.
now go to your view1->context.
drag the node you created, from the component controller to your view context.
now map the attribute to your input field.
you might be having a button to navigate to view2.
in view2 consider you are having another input field which displays the value you enterd in view1.
now drag the same node into your view 2 context.
so now view1 nad view2 will be sharing the same node.
so automatically the values will be passed.
---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.
What I need here is to pass the values which I have in my structures defined in method. for e.g.
data: ls_vbak type vbak.
select single * from vbak into ls_vbak.
The values in ls_vbak is what i have to pass to 2nd view. How do I define ls_vbak or access these values in 2nd view?
Hope my question is clear?
Thanks
Prasad
Hi,
you have to create in your component controller or custom controller both
the nodes of the search criteria and the results.
the views need to map these data nodes (search on search view, result on result view)
when you have your action handler on view 1, call the search function you need
to create in the compenent/custom controller, bind the results to the result node.
via the mapping the data will be automatically loaded into view 2, so you only need
to fire the navigation plug towards view2 from view1.
your result node will have ddic type of your structure,
you can add the different values you want from it as attributes.
In the layout designer, bind your uielements to this node
grtz,
Koen
hi prasad......
as i have already siad, the same thing applies for the structure too.
while creating a node.... you will have an option of specifying the structure. you can mention it as 'vbak'. this node will be i the component controller. just transfer and map the nodes into the two view context. now , in the coding part use the method, bind_table( ) to pass values to this node. it works fine......
---regards,
alex b justin
Hi Prasad,
In your case, you can pass data to the Output View via Plugs.
Create Outbound plug (Eg. TO_VIEW2) in the first view and define a parameter for it (of type vbak in your case).
Create Inbound plug (FROM_VIEW1) in the second View.
Create a navigation link between the two plugs (TO_VIEW2 and FROM_VIEW1) in the Window.
When you fire the outbound plug in the first view, pass a value for the parameter which you have defined.
In the event handler method of the inbound plug in the second View, you can access the parameter which you have passed by using WDEVENT.
Hope this solves your problem.
Thanks and Regards,
Saravana. S
Hello Prasad,
This is quite simple. All you have to do is share the context. Define a context structure in the component controller and share it in the two views. Now whatever changes you do in Input View will be reflected as they are in the Output View (As they are using the same context).
Hope this helps.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.