cancel
Showing results for 
Search instead for 
Did you mean: 

how to register component controller event with action of a field

Former Member
0 Kudos

Hi,

I have two components HEADER and MAIN. I am reusing HEADER in MAIN component. I want to trigger an event handler in MAIN component when an action is raised from a field in HEADER component. For this i have mentioned an event in component of HEADER and a method in same component to raise that component event. Now my question is how to register that component event when action corresponding to that view element gets triggered.

Regards,

Tushar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1. make sure that event in HEADER component is interface event. if not please make it by selecting the inyterface flag.

2. Declare the usage of InterfaceController of HEADER component in MAIN componentcontroller by selecting the properties tab.

3. Create one event handler method in componentcontroller of MAIN

4. Select your eventhandler method from methods tab in MAIN component

5. Press f4 from the cell of Event column

6. Select the event

7. Save, Activate, and Run

Thanks,

Rahul

Former Member
0 Kudos

Hi,

- In the MAIN component, create an event with the interface property as checked. The INTERFACE property here is very important as this will only make the event of the MAIN component visible in the HEADER component.

- Create a component usage of this MAIN component in the HEADER component, both in the component controller and the view controller.

-In the view controller create an action and in the action handler method attach the event from the MAIN component by pressing a F4 in the EVENT column present.

-Attach this action handler method to the UI element.

Also, just for your knowledge, you can have a look at the standard component WDR_TEST_OVS.

I hope this helps.

Regards,

Ashish.