cancel
Showing results for 
Search instead for 
Did you mean: 

Pass value of table across one controller to other controller

mahesh_jagnani
Participant
0 Kudos

Hi Experts,

My requirement is like this:-

There are three WD Component :-

1. Main WD Component

2. WD Component for Language

3. WD Component for Qualification

Main WD Component uses other 2 WD Component.

The Main WD Component has a view that contain a tab strip and in that tabstrip there are 2 tabs.The first tab contains a view container that embeded with the view of WD Component for Language.

The Second tab contains a view container that embeded with the view of WD Component for Qualification.

.The WD Component for Language contains a view which has a table which contains the Language data of the Employee.

Once the user launch the Main WD Component, The user see the view of "WD Component for Language" as in the first tab,After that user might change the data of that table. If he changes the data and switch to the other tab, a Pop up should display with SAVE/CANCEL option.

User press SAVE,Data should be save.

My Prob is how we will have the data of the view corresponds to WD Component for Language in the Main WD Component?? so that we can check.

Further i need to pass PERNR value to the " WD Component for Language" from "Main WD Component".

How we can do that.

Please help.

Thanks

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

ashish_shah
Contributor
0 Kudos

Hi Mahesh,

1) If you want to pass a value to a child component ( in your case language component ) , create an Interface method in your child component with a parameter for pernr.

2) From your main component , call this Child interface method along with the PERNR passed.

3) To get the data back from your Language component , create an interface node in your Language component's Component controller.

4) You can read this Interface node of child component from your Main component and perform your logic.

Let me know if you need help on any of the above steps.

Regards,

Ashish Shah

Answers (2)

Answers (2)

Former Member
0 Kudos

One of the way to realize this is to have a cross component context mapping.

make the context node of comp-1,comp-2 as interface node. Do context mapping in main comp.

pernr you can pass via plugs or create a setter method in used component. So main component calls the used component to set the pernr.

former_member1151507
Participant
0 Kudos

Hi Mahesh,

You can create an Interface node in 'WD Component for Language' component controller for PERNR and get the same node in 'Main WD Component' component controller using component usage. Using this method, if you fill PERNR value in 'Main WD Component' view, you can use the same value in 'WD Component for Language' view as well.

Same process applies to the SAVE process as well. Whatever node you are using in 'WD Component for Language' table, make that node as Interface node and get that node in 'Main WD Component'. Then you can access the data of 'WD Component for Language' table in 'Main WD Component'.

Regards,

Manogna