cancel
Showing results for 
Search instead for 
Did you mean: 

passing data from one view to another view

Former Member
0 Kudos

Hi ,

I have 2 views , got the data in first view and I need to pass this data to second view and bind it to the table in second view.I Know the binding part but how to pass the data from 1 view to another? please help.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

THANKS GUYZ .

Edited by: BrightSide on Dec 8, 2009 9:40 AM

Former Member
0 Kudos

hey ,

thanks for replies .I am new to this webdynpro could you please explain me in detail.

anyway ,I will go on about what I have done.

I created 2 nodes in component controller.

Map one node in one view and another node in second view.

In the first view i got data in both nodes now I want the data in second node to pass bind it to the table in second view.

In debugging I can see data of second node cleared out in second view.

Hope this gives you more idea where I am getting wrong.

Thanks

arjun_thakur
Active Contributor
0 Kudos

Hi,

I created 2 nodes in component controller.

Map one node in one view and another node in second view.

In the first view i got data in both nodes now I want the data in second node to pass bind it to the table in second view.

Instead of creating 2 nodes. Create 1 node. Map it to both the views. Get the data in that node. Then use the data in that node in any view.

Edited by: Arjun Thakur on Dec 8, 2009 2:07 PM

Former Member
0 Kudos

hi,

Create Node1 , Node 2 in component Controller.

Map Node1 and Node 2 in both the view View1 and view2.

This way, even if you are in view1 which is using Node1 you can populate node2 which is used in View2 and similarly access node 2 also.

Former Member
0 Kudos

Hi saurav I have done this but its not working , still I can see table cleared out in view 2.

Former Member
0 Kudos

hi,

Have you populated Node2 in your View1 only.

Please check if you have binded node 2 with any values or not.

As far as i can understand :

You have view1 which is using Node1. Now you want to transfer some contents from View1 to View2.

For this you have created another node in View1 by the name Node2. Passed the values to this node node2 and map it with component controller. Similiarly map this node from comp controller to View2 node to access the values in View2.

Former Member
0 Kudos

Hello BrightSide,

Dont map nodes of the views as it would not be the effecient way.

You have to declare a variable in the component controller as it would be common for both the views.

you have to store the value in the variable before navigating to the second view and fetch the data from the same varibale in wddoinit method of the second view and store the value in the attribute defined under the context for the second view.

Regards

Anurag

Former Member
0 Kudos

Hi,

You could use Component controller for this.

One option would be to create an Attribte in Component controller and pass the value to this attribute.

Now in second view , you can access this attribute.

For that you have to use :

wd_comp_controller->Att = 'Value '

Access this value in Second View using :

data lv type string.
lv = wd_comp_controller->Att.

Second option would be to Map nodes of View Controller View1 to Componnet controller.

This way you can access the Nodes of View 1 in View 2 using Mapping of View2 and Component Controller.

arjun_thakur
Active Contributor
0 Kudos

Hi,

Create a node in the component controller. Map it to both the views. Now get the data in that node. Then you can use the same data in both the views.

Regards

Arjun

Edited by: Arjun Thakur on Dec 8, 2009 1:46 PM