cancel
Showing results for 
Search instead for 
Did you mean: 

Component Controller

Former Member
0 Kudos

Hi All,

Why a web dyn pro component can have only one component controller?

thanks & regards,

Manoj.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Manoj..

<b><u>Component Controllers</u></b>

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.

This controller can be thought of as being hierarchically superior to all other controllers in the component. Consequently, the lifespan of the component is always equal to the lifespan of the component controller.

For each component of yours there will be a component controller, were in you can define context variables and methods, events etc.. This usefull while using models.

Simple example where we can see this is, when you create global context variable in this controller and map this variable to the view controller context variable of different view, which enables you to pass the value of the variable from one view to another.

<b><u>Custom Controllers</u></b>

They also have the same the function but as the name suggest there function can be customised. That is <b>we can have more than one custom controller for a component</b>. This is usefull when we need to create seperate execute methods for inputs from model import( Both webservice and rfc call).So you can seperate each other.

<u><b>Creating Custom Controller</b></u>

1.In the Web Dynpro Explorer, place the cursor on the node Custom Controllers (a subnode of the Web Dynpro component) and choose Create Custom Controller in the context menu.

2.In the wizard, enter a name for the custom controller and close the wizard by choosing Finish.

Hop this will help you..

Regards,

GS

Message was edited by:

Sathishkumar GS

Former Member
0 Kudos

thanks,

Satish

Answers (2)

Answers (2)

Former Member
0 Kudos

You can create multiple controllers by right clicking on the custom controllers and selecting the option create new custom controller. Custom controller provides all the functions of Component controller

Former Member
0 Kudos

Hi,

You can have more then one controller if u use custom controllers.

Aviad