cancel
Showing results for 
Search instead for 
Did you mean: 

controller

Former Member
0 Kudos

Diff Between Custom & Component Controllers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

component controllers r created automaticallly when u create a component but custom controllers shouild be created by your self when u fell u need it.

advantages: 1) task seperation.

2) decreases complexity.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

component controller:

Each Web Dynpro component has at least one global controller, called the componentController. The lifetime of the component controller is determined by the lifetime of the entire

Application. Every Web Dynpro controller has a data storage area known as the context. 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.

__Custom controller:_

Needed for storing context data used across several views. A Custom controller has a longer lifecycle than a View controller. Custom controllers belong to the component and live as long as the component lives in an application.

When should custom controller be used:

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

Former Member
0 Kudos

hi santhosh.....

component controller acts as a global place where you can have your variables and it is visble to all views.

[link|http://help.sap.com/saphelp_nw2004s/helpdata/en/b9/b82c4142aef623e10000000a155106/content.htm]

---regards,

alex b justin