Coupling between component controller and view controller

Hello,
I have seen some discussions in this forum regarding the possibilities of calling / triggering a view controllers's method from a component controller's method;  obviously the Web Dynpro framework only provides for the other direction (view ctrl -> comp ctrl) via handle <i>wd_comp_controller</i>.
Some people proposed raising events in the comp controller and catching these in the view controller, others pointed out that any dependance of a view controller on a component controller would violate MVC principles.
Now, I can't see why a tighter coupling (in both ways) between controllers within one component would harm MVC in any way. So I suggest to "register" a view controller in the pertaining component controller if necessary:
this_controller = wd_this->wd_get_api( ).
wd_comp_controller->register_view_ctrl_XYZ( this_controller ).
This way the component controller can save the reference and later call any method on it. What do you think, does anything argue against this practice?
Regards,
Sebastian

Hi Sebastian,
I wouldn't try to explain whether it is violating the MVC principles or not.
Can you please explain how to call methods of view using the view controller?
have you tried using an example???
I want to give a small example which I think is a basic disadvantage of calling View methods from component controller.
Suppose I have 30 methods in a view and such 7 views in a component (I think this is a very common example).
Till now one is very clear that if I have a method in view, it will be called at maximum by other methods with in the view. That means at any point of time, my search is limited to 30 methods.
Now if component controller can also call my search will become horrible and spread to 210 methods, unless otherwise, you are very good at naming attributes and wont make the mistake of assigning attributes wrongly.
Imagine the effort if the outside components also access these methods through interface.
Also I dont think that the webdynpro phase model can support this way of calling view methods. You might be successful once, but then you are trying to open a can of worms.
This is my way of thinking...
Also, it would be great if you can tell me whether you are successful in calling views methods or not???
Thanks,
Anand

Similar Messages

  • Difference between Component Controller and Custom Controllet...?

    Hi
    Can any one tell me Difference between Component Controller and Custom Controllet...?
    Best Regards
    Ravi Shankar B

    Hi RaviShankar B,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web%20dynpro%20sample%20applications%20and%20tutorials.htm
    Also refer to the below link
    Component and custom controllers
    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.
    Custom Controller:-
    They also have the same the function but as the name suggest there function can be customised. That is we can have more than one custom controller for a component. 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. Example is there in the more sample codes and application section.
    regards
    Anil Dichpally

  • Difference between component configuration and application configuration in webdynpro

    what is the difference between component configuration and application configuration in webdynpro?

    Hi Rohit,
    With the component configuration, you can control the behavior of each individual component within a Web Dynpro application or the user interface of individual views. For each component, several records of configuration data can be created.
    Using the application configuration, it is now possible to assign the configuration required in the current application to all the components used.
    In short : Component Config belongs to WDP Component and Appl'n Config. belongs to WDP Appl'n.
    Check this document for more information.
    Web Dynpro for ABAP - Component and Application Configuration
    Thanks
    KH

  • Difference between Component KB and Bulletin KB

    Dear All,
                    I can able to see some of the Update has same Component KB and Bulletin KB, and some of them not and due to this when work on WSUS server im getting confusion, can you  please help me out
    with the differnce between Component KB and Bulletin KB and which one we need to take it for reference the wsus server.
    Thanks 
    Balaji K

    Hi Balaji,
    In brief, Component KB.
    A bulletin is an announcement that a new update has been issued. A bulletin might cover one or more updates and discusses the vulnerability fixed by the updates. Typically, a bulletin announces updates for several products within the same product family.
    For example, a typical Windows security bulletin might include updates for Windows 8, Windows 7, Windows Server 2008 R2, Windows Vista, Windows 2003, Windows 2000, and Windows XP, and any other Windows products as appropriate.
    Each update is product-specific and might replace other updates issued earlier for that product in another bulletin.
    Best Regards.
    Steven Lee Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • 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

  • Difference between component controller & Custom controller

    Hi all
    what is the main difference b/w component controller , custom controller & interface controller.
    i want to know the difference of these three in the real time environment.
    if anybody explains me with any simple example then it is great help to me....
    Thanks
    Suresh babu.

    Hi Suresh,
    Component Controller and Custom Controller are more or less the same. Both are related to a particular component in the webdynpro application you create.
    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.
    Custome Controller:-
    They also have the same the function but as the name suggest there function can be customised. That is we can have more than one custom controller for a component. 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. Example is there in the more sample codes and application section.
    Interface Controller:
    There is only one interface controller for a component. It is mainly used when we need to communicate between two components.There is sample application for communication between two components in the sample codes and application section.
    Regards
    Sreedhar.

  • Issues with interactivity between component states and page states

    Hi there, I recently downloaded the trial of Catalyst 5.5 and am encountering the following problem:-
    I have many screens in my application and am attempting to get around the 20 state limit by creating custom components that contain multiple states that can be used as screens. So, I have created button links between the component states which work fine but have also created button links to and from the standard states of the application, which dont work upon running/publishing. I'm not quite sure whats wrong here as the button commands are pointing to the right place, i.e. they are pointing firstly to the specific custom component and then the state within the component, but its just not working.
    Is this a trial issue or something deeper?
    I really hope someone can help as apart from this issue I have been very happy with the application but if I can not find a solution theres no point in purchasing it.
    Cheers.

    Ive had the same problem. Im trying to create an interactive e-book but im having problmes with the limit of states. I have now worked out that i have to create custom components to create a sub-state but im finding it difficult to go between sub states. Help anyone?

  • What is the difference between hidden field and view state??

    Both view state and hidden field are use to store page specific information then, what is the difference between both of them??

    The ViewState of a page is actually stored in a large hidden field and it contains information about the entire page whereas a single hidden field that you define yourself is used to store some single value that should not be displayed.
    Please refer to the following page for more information about ASP.NET View State:
    http://msdn.microsoft.com/en-us/library/ms972976.aspx
    But please post your ASP.NET and web related questions at
    http://forums.asp.net in the future.
    Also, please remember to mark any helpful posts as answer.

  • Access between Linkup Sender and Viewer PCs

    When HP Linkup has been set up can the files and applications on the Viewer PC  be accessed from the Sender PC?

    I have an HP Touchsmart computer and an HP Omni.  Both are on a wireless home network.  Can either computer  be called the "remote" computer?  The Linkup software came with the HP Omni computer and hasn't been installed yet.  When I install the Linkup software does the HP Omni become the remote computer? What is the significance of which computer is called remote?

  • How to disable coupling between audio tracks and environment objects?

    I would like my environment to remain static. When I delete tracks on the Arrange page the corresponding environment objects dissappear. Is there any way to defeat this?
    I couldn't find an answer in the L8 manual. Environment objects continue to disappear even when I "protect cabling/positions"

    Yep, you need to turn off LP8's new "Auto-manage audio objects" function in the prefs.
    Now, as in all previous versions of Logic, you can create whatever audio objects you need in the environment, and they will all stay there like good obedient little objects.

  • 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

  • How to find out the Target Component name and Target view name

    Hi All Expert,
                      I want to know ,how to find out the target component and target view in WEB UI,when i click on a field which shows as a hyper link in WEB UI .At GUI level ,i know the how it will work.Any way to find out the component name and view name which is show the details of that field at GUI level .IF you go to transaction CRMD_ORDER then open the service contract id .then goto the item level value .there is 1 service data tab is available at item level.there is two button is available.first one is available time and second one is response time .if i click on any button then one popup is open which is shows the details of that button.I dont know how to find out the component name and view name from GUI level.
    Thanks in Advance....
    Vishwas Sahu

    Hi Vishwa,
                 The control would be something like this for navigation in Get_p_xxx method u mention as link and u mention a event name which gets triggered on the click of this hyperlink. So your GET_P_XXX method would have the following code:
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'EXAMPLE'.
    Now you have to create a method as EH_ONEXAMPLE at your IMPL class and within which you would give an outbound plug method. Within the outbound plug the target data would be filled in the collection and window outbound plug would be triggered.
    This is a huge topic and  i have just mentioned you basic things.
    Regards,
    Bharathy.

  • Exalytics OBIEE, TimesTen and Views

    Hi all,
    I'm currently working on a prototype with an Exalytics box. I have several schemas in the TimesTen database with caching groups using 11g in one Exadata as source. On TimesTen there's one extra schema that UNIONs ALL the information from all schemas into several Views. These Views are then used as OBIEE source.
    The first problem I ran into is that after adding the Views into OBIEE RPD Physical Layer, I'm not able to right click on the View and go into Physical Diagram, the option is not highlighted. I've imported tables from other schemas in TimesTen and was successfully able to join them in the Physical Diagram, the option is available to click, for Views it isn't, which is strange - You can use Oracle 11g Views as OBIEE source and it works perfectly.
    I've also tried to right click the Views in the RPD and View Data in the Physical Layer and OBIEE simply returns me a lot of errors, as can be seen below:
    [NQODBC][SQL_STATE:HY000][nQSError: 10058] A general error as occurred.
    [nQSError: 43113] Message returned from OBIS.
    [nQSError: 43093] An error occurred while processing the EXECUTE PHYSICAL statement.
    [nQSError: 16001] ODBC error state: 3700 code: 7025 message:
    [TimesTen][TimesTen 11.2.2.5.0 ODBC Driver][TimesTen]TT7025: Illegal use of reserved keyword "FROM", character position: 9 -- file "ptSqlY.y", lineno 9243, procedure "reserverd_word_or_syntax_error".
    [nQSError: 16014] SQL Statement preparation failed.
    Using TimesTen trace monitor I was able to see what query originated this error, and it was the following one:
    15:39:50.592 73 SQL      2L   11C   4393P Preparing: select  from DIM_DATE_VW
    15:39:50.592 74 SQL      4L   11C   4393P sbSqlCmdCompile1()(E): cmdType:100, cmdNum:1001123.
    15:39:50.592 75 ERR      4L   11C   4393P TT7025: Illegal use of reserved keyword "FROM", character position:9 -- file "ptSqlY.y", lineno 9243, procedure "reserved_word_or_syntax_error"
    Is this some sort of known bug or limitation between OBIEE, TimesTen and Views? Can anyone help?
    I'm running TimesTen 11.2.2.5.0, Oracle 11.2.0.3.0 and OBIEE 11.1.1.7.1.
    Best regards,
    André

    Who said you must buy Exalytics in order to use TT with OBIEE? If you already have it, just create an RPD connection pools and off you go. You won't be able to use all the nice bits 'n pieces a full Exalytics sports, but where OBIEE is concerned, it's just a source like any other.

  • Mapping between view controller and component controller

    Hi Experts,
    I am new to web dynpro ABAP. First I created an application using one input field and one button, my view name is V1. In view context, I created one node viz. NODE1 using table SFLIGHT, fields chosen are CARRID CONNID and FLDATE. I have bind that to my input field and for button I have not done any thing. So, when I am running this application it is allowing me to select value for my input field. After this, I have added a table to the view layout. I have added to nodes using sflight table in COMPONENT CONTROLLER. First node is SFLIGHT with CARRID, CONNID, FLDATE, PRICE and PLANETYPE and second node is NODE1(same name) with only CARRID. Now in VIEW CONTEXT it is showing -
    CONTEXT
       NODE1
         CARRID
         CONNID
         FLDATE
    (which I had created in VIEW CONTEXT for input field)
    CONTEXT COMPONENT CONTROLLER
       SFLIGHT
         CARRID
         CONNID
         FLDATE
         PRICE
         PLANETYPE
       NODE1
         CARRID
    (which I had created in component controller after adding table)
    Now both this context should be matched as per my knowledge, so that when I bind the table it should V1.SFLIGHT.<fieldname> and not as V1.NODE1.<fieldname>
    But I don't know how to match them. Please help.

    Hi Sambaran,
    I guess I understood what you want.
    To achieve this, proceed as follows:
    1)Open your View, goto Properties tab. Here in the Used controller table, click on the create icon to include the component controller (component controller is added by default by the framework, if you use custom controller you need to define this usage).
    2)Once you do this, goto Context tab of the view, here now you will be able to see the component controller on the right hand side.
    3)Next, drag the SFLIGHT node from the component controller, and drop it on the Context (root context) of the view (left side). Doing this system will create a mapped context node on the view which you will use to bind to the view elements on the layout.
    The above steps apply if you want to directly create a view context from component controller context.
    Hope this helps!
    Thanks,
    Chitrali

  • Read a View Context's node's element and assign from Component controller

    Hello Experts,
    I'm new to JAVA WD.
    Here is my scenario.
    I have to use an Adobe form in a WDJ. The input parameters and the output parameters of the DC are defined in a method in the Interface Controller method.
    The context of the Component Controller has the following structure
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    Then the mapping between the Component controller and the interface controller is done so that the Interface controller also has the context structure as
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    So now the interface controller and the component controller are bounded correctly.
    Now I bind the view also with the Component controller as below.
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    But since i need to use an Adobe interactive form inside this view, the datasource for the form cannot be the root context node but some other node. So I replicated the same structure in the view context so as to make the fields visible in the Adobe form context. Now the context looks as below.
    Context
    ---StartDate
    ---EndDate
    ---AbsenceType
    ---DATA_NODE
    -----StartDate
    -----EndDate
    -----AbsenceType
    Now my question is, how do i map the result from the Adobe form into the context of the view??
    What code should i write and where should i write to achieve this?
    I need to do the following. But dont know how to write the code for this.
    Context.StartDate = Context.DATA_NODE.StartDate
    Context.EndDate = Context.DATA_NODE.StartDate
    Context.AbsenceType= Context.DATA_NODE.AbsenceType
    Please help!
    Any help will be greatly appreciated.
    Thanks,
    Sam

    Hello Nikhil,
    I'm stuck with another small issue.
    Let me first explain what I'm trying to do.
    I have a view with the context structure as follows
    Context
    ---DATA_NODE (Node)
    ----Data1
    ----Data2
    ---Data1
    ---Data2
    All i need to do is, at the start of the view, i need to move the data from
    Context.Data1=>Context.DATA_NODE.Data1 and
    Context.Data2=>Context.DATA_NODE.Data2
    Also, at the View Submit button click, I need to move the data from
    Context.DATA_NODE.Data1 => Context.Data1 and
    Context.DATA_NODE.Data2 => Context.Data2
    (I managed to do this submit button click by calling an action->method and wrote the code as you gave earlier)
    wdContext.currentContextElement().setData1(wdContext.currentData_NodeElement().getData1());
    wdContext.currentContextElement().setData2(wdContext.currentData_NodeElement().getData2());
    But I wrote at wdInit() for the view the code in the reverse way, but the values are not getting passed to the Data_Node and hence its not defaulting with the values from the elements of the context.
    This is what I wrote.
    wdContext.currentData_NodeElement().setData1(wdContext.currentContextElement().getData1());
    wdContext.currentData_NodeElement().setData2(wdContext.currentContextElement().getData2());
    Please let me know if I'm doing something wrong here.
    Appreciate your help in advance!
    Cheers,
    Sam

Maybe you are looking for

  • Safari 4.0.3 PPC  = FREEZES when I click on iTunes Store Links!!!

    *EVERY TIME I click on iTunes Store Link in Safari 4.0.3 it FREEZES!* If I Disable Plug-ins, then NO PROBLEM, but then I can't watch Flash Videos on FaceBook etc. I've Re-Install Safari Several Times, and this problem went away Temporarily. I've Dele

  • Downpayments from customers - invoices

    Hello Now we are booking downpayments through FI (f-29) - based on bank report and f-32 (consilidating with SD invoice) We are setting branch office in new country, which has slitly different legislation regarding downpayments. For each downpayment w

  • How can I get my PC office documents onto my new ipad mini

    How can I get my microsoft office documents off my PC and onto my new Ipad mini?

  • Iphoto won't import from iPhone at all

    I can't figure it out.  At first it said there was a file which wouldn't allow it to continue.  I do have iCloud photos turned on but I want to back up all photos onto my hard drive so I have them securely elsewhere too.  Suggestions?  Usually I back

  • Essbase server creation error

    Hi, I have installed 11.1.2 sucessfully and all the services are running. When i started EAS and added "Administration Servers" it has been added sucessfully. But when i tried adding "Essbase Servers" it is throwing the following error. "Network Erro