Skip to Content
author's profile photo Former Member
Former Member

Conext Mapping between Views in different components

Hi All,

I have a 1 project and 1 Application associated to it. Now, I have two components A and B. Each controller has its view component A has View VA and component B has View VB.

VA has a input field Name and the value entered in VA should be displayed in VB.

This is can be easily achieved if both VA and VB are in the same component using context mappings.

Can someone please tell me as to how I could achieve this where VA and VB are in different components using context mappings or any other alternative.

Thanks in advance.

Best regards,

Divya

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 03:16 AM

    Hi Divya,

    When you have two components then you will have to use the component interface controller.

    The below link has in detail the process doing inter component communication.

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on server-side eventing - 14.htm

    I think this will help you.

    regards,

    Mahesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2005 at 04:05 AM

    Hi Divya

    If 2 components are there in application,their values can be transferred both by context mapping and event handling.

    1)Event Handling:(Let VA is Receiving the data from VB)

    i.Let VB can be used by the VA (i.e.,embedded) in the used component of VA. The interface controller of VB will be available to the VA if declared as the used component.

    ii.Declare a event(NameEvent) and a method (intefacemethod)in the interface controller of the VB.

    iii.Pass the value of VB to the method of interface controller.(i.e)wdThis.wdGetintefaceController().intefacemethod(name);

    iv.This method in interface controller will fire the event to VA (i.e)wdThis.wdFireEventNameEvent(Toname);.

    v. Create the event handler in VA and handle the event in VA.

    2)Context mapping:(Passing Values From VA to VB)

    External mapping is possible by mapping view controller of VA to the interface controller of VB. Then it is mapped to the view controller of VA.

    Regards

    Vijayakhanna Raman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.