cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between component controller and custom controller?

Former Member
0 Kudos

Hi ,

can any one tell what is difference between component controller and custom controller?

and what is the purpose of empty views in webdynpros?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Narendra,

Please check the below link which is a simlar kind of posting

regards

Anil

hope that helps.

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

The component controller is the master controller for a Web Dynpro Component. As soon as you declare the existence of a Web Dynpro Component, the component controller is automatically created. You cannot have a Web Dynpro Component without a component controller.

Custom controllers should be created only when their presence will simplify the overall structure of the component. The existence of custom controllers is controlled entirely by the Web Dynpro developer at design time.The principles to follow for deciding when a custom controller is needed are:

Reuse

Create a custom controller if you have identified a reuse case for a specific unit of code required by several other controllers within the component.

Task separation

To avoid placing too much coding in the component controller (and thereby potentially increasing its initialization time), place coding dedicated to a specific task into a separate custom controller

Regards

SURYA

Former Member
0 Kudos

Hi,

Both the controllers are mainly used to pass data between view controllers. Component controller is commmon for all components, but custom controller is created by the programmer as per the requirement of program. It is possible to develop applications without using custom controllers, but it will increase the complexity. For example, if the program is communicating with more than one models, it is better to create one custom controller for interacting with each model, instead of gng for a single component controller.

I had used Empty view when working with viewsets to control the visibility, when a plug is fired. I dont know whether it is having any other usage

Regards

Fahad Hamsa

Former Member
0 Kudos
Former Member
0 Kudos

Hi Narendra...

Here s the difference...

COMPONENT CONTROLLER-->

1. The component Controller is the main

Controller in Webdynpro Component.

After Creating component,CC is Automaticaly

Created.

2. The Component controller has no visual

interface, so it cant present user

the information.

3. When the wdP runtime receives the url,

CC of root component is instantiated.

CUSTOM CONTROLLER-->

1.Custom Controllers are only created by

explicit design time declaration.

2.Custom Controllers also not having visual interface,

the existence of custom controllers is controlled

entirely by the Web Dynpro developer at design time.

3.Custom controllers should be created only when their

presence will simplify the overall structure of the

Component.

Message was edited by:

Sathishkumar GS

Message was edited by:

Sathishkumar GS

Former Member
0 Kudos

Hi naren,

The component controller is automatically generated master controller for the entire component and its automatically created when a component is created. , In custom controller Encapsulate functionality that is shared by several controllers and it’s require no direct user interaction, a Custom controllers should only be added in situations that will optimize or simplify the architecture of our application

useful links

Regards,

vino

Former Member
0 Kudos

Hi

A custom controller is a special type of controller of a Web Dynpro application, which the Web Dynpro application developer can create explicitly if required. Like all other controller types, the custom controller contains a context class, which is automatically generated when the custom controller is defined. Furthermore, the custom controller contains imported packages and methods that are then relevant to all classes in a Web Dynpro application. The custom controller is also the part of an application that implements the event handlers and validators that react to actions.

Using an Empty view u can you can model the state of a view area that is empty at runtime.These empty views do not contain UI elements, but can be used for defining the view composition.

Regards

Krishna