cancel
Showing results for 
Search instead for 
Did you mean: 

Data Flow between two Component Controller

Former Member
0 Kudos

Hi,

I have few questions in Webdynpro for Java .

1 . What is the difference in Component Controller , Interface Controller and Custom Controller .Which one should be used in which case .

2 . Suppose i am using two component controllers Comp1 and Comp2 inside the same DC .There is only one application named App1.

Can anybody tell me the steps regarding how to link the first component controller Comp1 with the second one Comp2 so that data flows between the two controllers .

If there is more then one application (without workflow), then how it should be .

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Regards,

Naga

Answers (3)

Answers (3)

asif_hirani
Active Participant
0 Kudos

hi

Hope this answers all u r questions

1 . What is the difference in Component Controller , Interface Controller and Custom Controller .Which one should be used in which case .

Controllers are basically of 2 types

1. view controller

2. Custom controllers

View Contollers have both Programmatic as well as visual part visual part . Visual part is the Layout which is responsible for displaying the data and programmatic part is context + Implementation which is responsible for processing the entered Data or Generating the data to be displayed

but generally we use View controllers only for diplaying data ( AS per MVC design paradigm ]

Custom controllers have only programmatic part and no visual part . Views should be dependent on Custom controllers for data and not the other way round .

Default custom controller is called as Component controller and is also Heirrarchically superior to all the controllers. Means this is the first controller in ur Web Dynpro Component to be Instantiated and is assured to be instantiated where as other custom controllers can not be assured in which order they will get get instantiated. so no pre assumptions should be made while writting the code

U can create as many custom controllers as u want but u should be familure with above fact that order in which they get instatiated cannot be assured except for Component controller so u should make no pre assumption of there exsistence

Finally Interface Controller get instantiaed only when u add one web Dynpro Component as Used Web Dynpro Component inside another Web Dynpro component so interface controllers are used for passing data / Receving data from one web Dynpro component to another web Dynpro component

2. Suppose i am using two component controllers Comp1 and Comp2 inside the same DC .There is only one application named App1.

Can anybody tell me the steps regarding how to link the first component controller Comp1 with the second one Comp2 so that data flows between the two controllers .

if ur using two component controllers Comp1 and Comp2 inside same Wed dynpro DC and and inside same Web dynpro Component lets say comp1 wants to use data from Comp2 then u should add Comp2 as the Required controller in properties tab of comp1 controller

or the other simple way is to open Data Modeller (double click on the name of ur Web dynpro Component and expand Diagram view ] u can just drag and drop Data Link between two controllers so above step of adding the required controller is done automaticall and u can straight away proceed with Mapping between the Node to share the data between them

and if comp1 and comp2 are in different Web dynpro components but again inside same Dc u will have to use Interface Controller between the custom controller u can check out The Exercise for use of interface controller

3. and ur last question If there is more then one application (without workflow), then how it should be .

Applcations are simply entry point into ur component ( providing URL ]they are not unit of developement so ur again back to ur second point comp1 comp2 inside same weddynpro DC and in different web dynpro component then use Interface controllers and if same DC and Same web dynpro component direct drag data link in the data Modeller

regards

ASIF

abhijeet_mukkawar
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

1..Component Controller is linked with the particular webdynpro component.It's a common place inside the controller in which context creation/mapping, code, functions are kept and it is shared by all views inside the controller.

Note: Custom controller is same as component controller which the user creates.i.e User can create multiple methods in it.

2. Interface controller is the place when you use the functionalities of a external component preferably DC (development component features which are published thru Public part - for sharing with other DC).

So if you are using the context, code, functions of a "Used DC" you use the Interface Controller.

Practically many developers are creating several DC and the sharing of code happens thru Public part.You add DC in the "Used DC" node , map the context to component controller and map again the view controller for the specific nodes you require.

3.Under used Models U can find this onUsed WebDynproComponent->Add Used Component.

Lik this u can add the components.

I hope u understand this concept..

If u hav any doubts plz revert me back

Regards,

Lavanya.G