on 05-28-2009 2:52 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.