Skip to Content

Component and custom controllers

Hi! Can someone tell me the difference between custom and component controllers? and any guidelines as when to use what?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Posted on Mar 01, 2005 at 06:04 AM

    Hi Harsh,

    as far as I know, there is no difference between the component & custom controllers functionwise. Everything thats possible throough a component controller is possible through the custom one too. Why we use custom controller is when we want to segregate our codes and functionality in a modularized way. If I am using tw types of models or two different systems in my application I may wish to put the specific codes in two different custom controllers.

    Hope it helps!!!

    Shubhadip

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Mar 01, 2005 at 06:38 AM

    As per the WebDynpro Application goes there will be only one component controller and as many custom controllers. And Really I didn't find any particular difference between these two controls functionalities except that you have wdDoBeforeNavigation and wdDoPostProcessing methods in a Component Controller. Only thing is based on functionalities you can divide things between custom controllers.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Mar 02, 2005 at 03:36 AM

    Hi,

    Majority Component/Coustom controllers resembles same. Still I found following differences

    There will be only one default <b>Component controller</b> (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 <b>wdDoInit(), wdDoExit()</b>

    <b>public void wdDoPostProcessing(boolean isCurrentRoot)</b>[

    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.

    <b>public void wdDoBeforeNavigation(boolean isCurrentRoot)</b>[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

    I hope it helped you

    RK

    Add comment
    10|10000 characters needed characters exceeded