cancel
Showing results for 
Search instead for 
Did you mean: 

Event handling in zranges custom tag

Former Member
0 Kudos

Hi,

I am using the tutorials by Thomas Jung on the ranges. I am faces a very strange problem. I have created that extension. My application framework is like bsp_model application. I have one main controller and two sub controller. when ever I chose any option,

An event is generated and do_Handle_event of main controller is called but ideally the do_handle_event of right controller should be called .Any Explanation about this behavior.

regards

Ashish

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member191062
Active Contributor
0 Kudos

Hello,

the event handler of the main controller is always called. You have to dispatch the event to get to the sub-controllers.

Please check TUTORIAL_3_MVC BSP application. You have to call dispatch_input( ). in the DO_REQUEST methof of your main controller.

Regards,

Dezso

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I was just about to post the same thing as Dezso Pap. If you test this out and there is some other problem - with the tutorial perhaps - please post back here. I will have a watch on this thread just in case.

Former Member
0 Kudos

Hi Dezso,

> <i>the event handler of the main controller is always called</i>

As far as I know the Do_Handle_Event is called only for the controller in which event has been triggered it may be any sub-controllor or main controllor.

You are right that we dispatch the event through calling method Dispatch_input( ) in the Do_Request( ) method of main controller. Dispatch_Input do the followings...

1. First it calls Do_Handle_Data of sub-controllor's in the same order as they are instansiated in the main controllor and then finally Do_Handle_Data of main controllor is called.

2. Now Do_Handle_Event is called only for the controllor where event is triggered.

3 Now Do_Finish_Input is called in same sequence as Do_Handle_Data .

Correct me if I am wrong somewhare till now.

Now let me explaine my problem in detail...

I am using custom tag zranges in a view which is registered to a sub-controllor, I want to trap the event triggered when any option is selected but I am unable to do that. Please suggest me some solution to this prblem.

Thanks and Regards,

Ashish

former_member191062
Active Contributor
0 Kudos

Hello,

maybe I was not clear enough, I meant the DO_REQUEST method of the main controller ist the one wich is always called. As here should the event / data be dispatched. /* Dispatch_input( ) */. Your steps are correct.

What event do you see gets called? /* debug */ Can the dispatch input find your sub controller? Are you using underscores '_' in BSP compoenent ID's? - it can cause problems (SAP note: #619450)

Regards,

Dezso