Friday, 24 May 2013

34.CREATING CONTEXT NODE IN CUSTOM CONTROLLER



Go to the ui component –component structure browser. Open the custom controller. Go to the context node level and right click on context node and choose CREATE option.






In the wizard, give the context node name and choose the model entity as BTAdminh. 






Why we have chosen BTAdminh as model entity?

Because we need to do data binding between this node and node of view header. The base entity that we mentioned for header view is BTAdminh. Entities must be same to bind the data. 

Just complete the wizard and save the entries.  We have created context node. 

Then we need to bind the data. Go to the view header and right click on the context node header. Choose the create binding option. 







In the next dialog box, choose the values as shown below.
 




We have chosen the context node that we have created in the custom controller. Choose continue to complete the binding. 

Now data will flow from custom controller context node to header view context node. However we still need to feed the data to the custom controller context node. That we will do in the event handler of result view.

1 comment:

  1. Hello Mannala,

    First of all, than you for your blog. :)

    I have tried to add a new context node in a view, as per your blog (http://www.sapcrmwebui.com/2013/05/34creating-context-node-in-custom.html), but it didn't work. Actually, the context node is there, but I couldn't perform the biding.

    The reason is why I have choosen view instead of Custom Controller.
    In my scenario I have 3 views, it is a step-by-step...
    The step 2 has BTCUSTOMERH and I'm using some fields
    The view 3 is a summary, but BTCUSTOMERH was not there.
    I added BTCUSTOMERH in view 3 as per your blog. It worked!!!!

    If the biddng is not performed, then I can select the fields from BTCUSTOMERH, but they are empty.

    If I perform the budding from the view controler, from view 2, then there is a short dump saying that biding type it is not supported.

    I have tried to use the other options, like Custom Contoller or others, but BTCUSTOMERH is only used in step 2.

    Could you give me some advise on this?

    Thank you so much.
    Fernando

    ReplyDelete