Skip to Content
0
Former Member
Oct 13, 2005 at 04:21 AM

Have a problem in calling a subcontroller

31 Views

I try to use the model class and call a subcontroller class to display data in another view by using the following code.

<b>In the do_init</b>

  • Create the model of this class

l_model = create_model( model_id = c_model_id

class_name = lc_class_name ).

  • Create sub controller

l_controller ?= create_controller(

controller_name = lc_control_name

controller_id = c_subcontrol_id ).

controller_set_active( controller_id = c_subcontrol_id

active = 0 ).

l_controller->set_model( model_id = c_model_id

model_instance = l_model ).

<b>In the do_request</b>

controller_set_active( controller_id = c_subcontrol_id

active = 1 ).

call_controller( l_subcontrol ).

clear current_event.

At the view of subcontroller, after any event occurs, the parent controller is triggered again. Why? How can I solve this problem?