cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Component controller & Custom controller

Former Member
0 Kudos

Whats the exact difference between Component controller & Custom controler?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Closed.

Former Member
0 Kudos

Hi Vijay,

There will be only one default Component controller (called global) in a particular project but there can be any number of coustom controllers (we can create depending upon the requirement).

Component controller has the follwing methods apart from wdDoInit(), wdDoExit()

public void wdDoPostProcessing(boolean isCurrentRoot)[

This method is called to handle data retrieval errors before rendering.After doModifyView(), the Web Dynpro Framework gets all context data needed

*for rendering by validating the contexts (which in turn calls the supply

  • functions and supplying relation roles). In this hook, the application

  • should handle the errors which occurred during validation of the contexts.

public void wdDoBeforeNavigation(boolean isCurrentRoot)[This allows you to flush the model queue and handle any

errors that occur. Firing outbound plugs is allowed.]

Genarally all the coustom code is coded in coustom controller for example if you want to add additional methods of your own, in case if you want to validate webdynpro UI elements input this validation code is coded in coustom controllers

go through the following URL

http://help.sap.com/saphelp_webas630/helpdata/en/eb/e1cb5eea012b4481f8077c6023a70e/content.htm

The difference between the two is nicely explained in the following thread:

https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=http%3A//forums.sdn.sap.com/th...

and here too:

https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=http%3A//forums.sdn.sap.com/th...

Regards.

Rajat

Former Member
0 Kudos

Hi Vijay,

There already similar topic discussions going on , you can very well refer those topics under this forum to get idea on difference between component controller and custom controller ,

if you dont find it ,

Check the following threads

Regards,

Sam Charles J

Former Member
0 Kudos

Component controller is only one, which comes by default with a component. On the other hand, you may create and use as many custom controllers as needed... The purpose of both is same. Just that if you want to divide your tasks between multiple controllers, you create your own controllers called custom controllers. The context of a component or custom controller is like a global data store to be used between multiple views that have this controller usage.

Its a very basic que, I guess if you could search you'll easily find all information in help.sap.com.