Component controller Vs interface controller

Hi Experts
Please state me the difference and similarities between the component controller and interface controller
Regards
Noel

Hi
Similarities between these two is that both are controller but each having different purpose in the application
Component Controller
1.Starting point of any application,(you can't create any app without defining any Component)
2.Master Controller of the complete Component structure (View ,Model ,interface ,window)
3.If function defined in Component Controller or Custom Controller it is available to any controller within your  component (Interface, View, Custom) but not available outside.
Interface Controller
  1. To make Contents outside of the world one separate controller called Interface  Controller come into picture
      whose only task is to exposing of the content to outside.
take further help from following threads
1.[Component Controller,Custom Controller,interface controller|Component Controller,Custom Controller,interface controller;
2. [Basic Question regarding component Controller and component interface|Re: Basic Question regarding component Controller and component interface;
3.[controllers and components|Re: confused with controllers and components.;

Similar Messages

  • Call method of interface controller from component controller

    hi,
    I have created one method in the interface controller of a component. Now i have this method along with attributes to the component controller. Now from the component controller i want to call the method of the interface controller. How do i do it???

    Hi,
    You dont need to call the method from the interface controller when you are in the same component.
    You can call the method which is in the component controller.
    Interface controller is used to expose some methods to a different component.
    Ex Comp a want to expose a method which will be used by comp b then  you need the interface controller in comp a.
    Comp b will use comp a as used component
    then it will invoke the methods.
    Regards
    Ayyapparaj

  • Interface Controller Issue

    Hi,
    Hope you can help me on this one. We're trying to use an interface controller to use an external Web Dynpro app in our current Web Dynpro project. Whenever we try to do some context mapping in our Wed Dynpro project, it seems that our Web Dynpro project (during build time) fails to identify context of our component controller (it gives an <insert context node name / context objects here> cannot be resolved errors).
    Did anyone experience this error or would anyone know how to resolve this?
    Thanks!
    Angelo

    Hi Angelo,
    Please have a look at below document might helps for your issue In[Inter Application Communication and Navigation (Design Time) in WebDynpro|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0ae5f90-1679-2c10-4183-8c64cf932088?quicklink=index&overridelayout=true]
    Suppose there are two DC1 and DC2.
    DC1 having context node XYZ/attrubute available in DC1 component Controller and interface controller and mapped it properly.
    - then build and deploy DC1.
    - Now sync sources and sync used DC for DC2
    - then click on component name of the DC2 and bind interface controller to component controller and drag n drop context node XYZ to component controller.
    - once done then try to re-build and use the contect node XYZ
    Hope it will helps
    Regards
    Arun

  • Referenz on interface controller needed

    Hello,
    my COMPONENTCONTROLLER has an interface method which needs to be called outside the web dynpro component. To be more specific: this method needs to be called in an ABAP OO class, not in a using component.
    Therefore I want to transfer a referenz on the interface controller (IWCI_<component>) to the ABAP OO class. But I don't know how to create a referenz on the interface controller (in the component of the interface controller!).
    Best regards, Hergen

    Hi Hergen,
    Below code snippet may help you to acess the interface method of the webdynpro component in an ABAP class.
    lo_interface_controller          TYPE REF TO abap_interface_controller.
    ( to get ABAP  interface name go to webdynpro component interface -> go to  interface controller -> properties-> ABAP Class name,  is the interface which need to be used in the programming )
    lo_interface_controller ?= wd_this.
    ( reference to Component controller of your webdynpro component in which above interface method is being used  )
    lo_interface_controller->interface_method( ).
    now you can use this interface controller's reference to acess the method of that interface.
    I hope this will help you.
    Thanks,
    Prashanth

  • Interface Controller context model attribute error

    I am trying to create a controller interface as such:  I created a DC that goes out and retrieves SAP ID using a RFC call.  My controller context is bound to a RFC model.  I'd like to expose the SAP ID that comes back from that call within a model attribute to other components.  I try to create a model node and corresponding model attribute within the Interface Controller, setting the isInputElement = true.  However, as soon as I do this I get a number of compile errors:
    "The context model node has not been bound to a model class", "The context model attribute has not been bound to a model property". 
    Are you not allowed to map model nodes to an interface?

    Karla,
    First, set isInputElement to false. Think again, you are exposint "result" outside but not collecting "input" from outer component.
    Next, calculated attributes to the rescue here.
    Say, in component controller you have 1..1 / 0..1 model node <i>SapIdQuery_Input</i> with 1..1/0..1 child <i>SapIdQuery_Output</i> that holds <i>System_Id</i> attribute, type <i>string</i>.
    Now create in component controller context (right below root node) attribute <i>System_Id</i> of type <i>string</i>, set read-only to true and calculated to true. Switch to source editor and write the following for generated attribute "getter":
    if (wdContext.currentSapIdQuery_InputElement() != null &&
        wdContext.currentSapIdQuery_OutputElement() != null)
      return (String)wdContext
        .currentSapIdQuery_OutputElement()
          .getAttributeValue("System_Id");
    else
      return null;
    Now add controller usage (of component controller) in interface controller and map attribute in interface controller to calculated attribute in component controller.
    If you expirienced problems with mapping, try to create calculated attribute in 1..1 subnode of root context node.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Context from interface controller

    Hi Experts,
    I am Using one DC A in DC B.
    Using interface controller context mapping I got the Context of DC A in DC B.
    I mapped the context also.
    Now I have added new context node in DC A, I want map it in DC B.
    But I am not able to see the newly added Context of DC A in the interface contrlloer.
    I have done refresh, rebuild and Sync options but no use.
    How can I resolve this?
    Regards,
    Naresh

    Hi,
    Copy and paste the newly created context from component controller to interface controller
    Then do a build.
    Regards
    Ayyapparaj

  • Component Interface , INterface controller in WEB UI

    Hi Experts,
    Can anyone tell me what is a component interface, component usage , Interface controller and interface view?
    I am a beginner in WEB UI and is getting confused with these terms.
    Please help.
    Many Thanks,
    Neeraj

    Hi,
    component interface -> interface view:
    Here you can define which Comp/Window should be accessable from outside the component
    For example: COMP_1/MainWindow in component interface means this can be accessed as usage from other component
    component interface -> interface controller:
    In this node there is 2 child nodes: Context and Events:
    I don't know how to use Events. But in Context you can add context node from component controller, which can be accessed from outside. This is specially important, when you want to bind two context nodes from two different components.
    You can see how this can be used in component controller class in the method WD_USAGE_INITIALIZE
    component usage:
    Here you can define a usage of of other component.
    For example: In your COMP_2 you can create a usage from other component (COMP_1/MainWindow).
    Regards,
    Steve

  • Regarding Component interface controller

    hi all
    Can anyone explain me use of Component Interface Controller under Component with example.
    Thanks in advance
    Imityaz

    Hi,
    Interface Controller
    One Web Dynpro Component may declare the use of another Web Dynpro Component to form a u201CParent-Childu201D usage relationship. In such cases, the only point of interaction between the parent and child components is the functionality found in the childu2019s interface controller.
    if an interface controller is part of a component interface, the controller editor is in change mode and the context, the events and the methods can be implemented and edited directly.
    Refer this thread,step by step procedure is there.
    /docs/DOC-8061#61 [original link is broken]
    http://help.sap.com/saphelp_nw70/helpdata/EN/47/45641b80f81962e10000000a114a6b/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/44/0dcafa2d9d1ca2e10000000a11466f/frameset.htm
    Regards,
    Sunaina Reddy T

  • Interface Controller of a Component

    Hi,
    Can anyone explain/provide any doc which explains using one component in another component using interface controller.
    Warm Regards,
    Imtiyaz

    Hi,
    Refer these links,
    WebDynpro Componentization [original link is broken]
    https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/c053bcfa-426e-2910-f28a-91dec33159d6 [original link is broken]
    http://help.sap.com/saphelp_nw04/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f727d100-0801-0010-4cbd-b0ad5c161945.
    /people/sudhir.gorantla4/blog/2008/02/27/componentization-of-webdynpro-application-in-ce71
    Regards,
    Sunaina Reddy T

  • How to create  in the Interface controller of a component

    Hi  Gurus............
    Could any one tel  How to create a method  in the interface controller of component
    and  use that componet  into other  comoponent as  Used Contoller .
    I  Found  following  Tutorial  but it was not cleared  Description.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a33195f
    Thanks in Advance.

    Hi all,
    My actual requirement is as follows..
    I have implemented some functionality in One component .
    Here I  want to create a new method in the interface controller, so that I should be able to access this method in another component by declaring this component as used component in another one.
    My problem is, I am unable to create new method in interface controller of my component,
    It is appearing i n 'disabled' mode.
    Can any one please suggest me the appropriate solution?
    Thanks in advance
    SivaKumar

  • How to consume a method on the interface controller from another component?

    Hello,
    I have a project which contains two Components, A & B.
    I have exposed a method at the interface controller of Component A. How can I consume it from Component B?

    Hi,
       First add ComponentA as a used webdynpro component in ComponentB. Then open the Interface Controller of B and switch to Properties Tab. Select Add in the "Required Controllers" section. From the dialog that appears, select A's interface controller. Then you can access A's method from B's interface controller as:
    wdThis.wdGetAComponentInterface().<method>;
    Regards,
    Satyajit.

  • Design question: Interface Controller vs. component controller

    Hello,
    I have a component A. This component has a component controller (compController) and an interface controller (intController).
    Component controller has method compMethod()
    Interface controller has method intMethod()
    - Am i allowed to call intMethod from component controller? ( i'm pretty sure this isnt bad design because this is also done in the tutorial on eventing)
    - Am i allowed to call compMethod from intController or is this bad design?
    - Am i allowed to subscribe compController to event in intController or is this bad design?
    Kind regards,
    Joren

    Hi Joren,
    like Valery already pointed out, we recommend not to implement any logic in the component interface controller but only implement methods used for delegating logic to the component controller. This is based on the fact, that the component interface controller will be implemented by the component controller in the the next major SAP NetWeaver Release. This means that it will not have its own Java class like in NW04 and NW04s. To simplify migration the interface controller code should be as slim as possible by applying the delegation principle.
    You wrote:
    <i>- Am i allowed to call intMethod from component controller? ( i'm pretty sure this isnt bad design because this is also done in the tutorial on eventing)</i>
    Yes, my (very old) tutorial on serverside eventing exposes a public method <i>fireEvent()</i> which is invoked by the component controller. In early versions of NW04 the wdFireEventInnerEvent() method was not exposed in the IPublic-API of the component interface controller but only in the IPrivate-API. Therefore an additional method fireEvent() must be defined to fire the event from another controller. As a negative side effect, this public fireEvent() method is also exposed by the IExternal-API of the component interface  controller so that the event can be fired from outside (by the Embedder component) which is not desired in most cases.
    Meanwhile the wdFire<event name>() method is exposed by the IPublic-API of the component interface controller, so that the public method fire<Event name>() is no longer needed.
    I will update the tutorial in this respect so that it again propagates best practices.
    Regards, Bertram

  • Difference between custom controller and interface component

    Hi,
        Can anybody tell me what are the differences between component controller and custome controller , component interface.
    Thanks in advance.
    Regards
    sireesha.

    hi,
    When any component is created web dynpro framework automatically generates the controller(controller is nothing but entity which controls the working of views and acts as a binding layer between model and view), this controller is called Component controller.
    We can have as many controller as we want, but they should be used sparingly, Controller should encapsulate the functionality which is common to whole component , like if your application fetches master data and appliaction data so better you should have 2 controller , 1 for master and 2 for application so as to have modularisation in your application.
    Component Interface is the entity which is used when you want to use the functionality defined in some other component i.e. if your main  component is acting as a parent comopnent then the child component usage should be defined via this interface controller under Component Interface, so that main compo will access it via childs Interface Controller.
    Other node under this , Interface view , gets generated for every creation of window , Interface view is entry point into our application for web Dynpro framework
    jsut check out following links,
    Re: Difference between Component Controller and Custom Controllet...?
    Re: custom vs component controller
    check out these ex for the Component Interface and node under this,
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/19e6e990-0201-0010-eca6-a62e342eaad3 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/1ee0e990-0201-0010-75bf-a087c241cb83 [original link is broken]
    hope it helps
    regards

  • Diff between Component controller,Custome controller and  View controller

    hi,
        Can any body tell me the following details,
    1.difference between the Component controller,Custome controller and  View controller in WD-ABAP.?
    2.what is Lead Selection?   
    Regards,
    Ravi

    Hi Ravi.
    The component controller is visbile to all views in a component. So all context nodes and methods you create here can be accessed from all views in the component. This way you can share data between the views by mapping context nodes or thru method calls. You can also mark methods and nodes as interface so that they are acessable from other components that define component usages to this cmponent.
    Custom controller is quiet similar to the component controller. You can define it if you want to group some views with a custom controller for a certain functionality.
    If you want to access a custom controller in a view you have to define the usage first on the properties tab of the view.
    A view controller is only visible in the view itself. So all methods or context nodes you define here are only accesable by the current view.
    The lead selection is in most cases the current selected element in a context node. The lead selection is used by many UI elements to determine which element has to be shown (e.g drop down).
    If you have a table with single selection the current selected table row is the lead selection element of the bound context node.
    SO you can get the lead selection element easily in any mthod by calling context_node->get_element( ).
    Hope this clears your questions.
    Cheers,
    Sascha

  • How to create a method in Interface Controller

    Hi Guys,
            I am working with webdynpro ABAP sample application "Component usage" . There i got a issue like i am not able to create a method in Interface controller. There i am not able to edit anything. Can anybody please let me know how to do that.
                Thanks In Advance
    Regards
    Ravikumar

    Hi Ravi,
              Check This
    If one Web Dynpro component (parent component) needs access to another Web
    Dynpro component (child component) the parent component can declare the use
    of the child component. A specific component usage instance is then created and
    the parent component accesses the functionality of the child component via its
    component interface controller.
    The only parts of a Web Dynpro component that are visible to the user, are the
    interface controller and the interface view(s).
    All Web Dynpro components have only one interface controller. Via the
    interface controller, data, methods, and event handlers can be exposed to
    other components.
    Interface views represent the visual interface of a Web Dynpro component.
    There is a one-to-one relationship between a Window and an interface view.
    Each time a window is defined, a related interface view is automatically
    generated, which makes the window accessible from outside the component.
    The interface view only exposes those inbound and outbound plugs to the
    component user that have the interface property checked. Methods and
    context data of the window are not accessible via the related interface view.
    If the component has no views, there is no need to have Windows. In this
    case, the component will not implement an interface view. Such components
    having no visual interface are known as faceless components.
    Regards
    Sarath

Maybe you are looking for