Monday 9 July 2012

Binding

Context Node  binding on custom controller


The prerequisite for the successful context node Binding is that the context nodes to be bound must have same attributes.
Binding the context node(CV1) of a view controller with the context node(CC1) of a Custom Controller cab be done using a wizard while creating a view in a component, However it can be done manually by retrospectively inserting the following code in the CREATE_(CONTEXT_NODE) method of the context (.CTXT extension) Class.

Owner-> do_context_node_binding ( iv_controller_type = cl_bsp_wd_controller =>co_type_custom
                                                          iv_name  =  'name of the custom controller'
                                                       iv_target_node_name =  'name of the target context node'  "Here CC1
                                                     iv_source_node_name =  name of the source context node ). "HereCV1

We can carry out the context node binding  from View Controller to the component controller

      In this case  replace the constant "cl_bsp_wd_controller=>co_type_custom" with                 "cl_bsp_wd_controller=>co_type_component" in the above method of the context class.

No comments:

Post a Comment