Skip to Content
avatar image
Former Member

Binding 2 Models in the Same component controller

I'm using 2 Import Adaptive RFC Models. I want to bind both the models in the component controller of the same web dynpro component.

But when I try to do model binding for the second model, it does not allow me to do so. If I try to bind the same model in a different project, it happens perfectly and works fine. That means the model i.e. the BAPI is perfectly ok.

Can anyone please tell why is it not allowing to bind 2 models in the component controller of the same web dynpro component?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Sep 09, 2004 at 04:57 AM

    Hi Satyadev,

    If I undersatand your description properly, you have 2 models nodes in a webdynpro component, and you want to bind these two together. If this is the question, then, yes you cant do the bindings declaralatively, you have to do it dynamically...

    Look at the code snippet below, it may help you...

    Suppose ChildNode1 and ChildNode2 are the model node in the context of the component controller. Then you can map these two nodes dynamically....

    wdContext.wdGetAPI().reset();

    IWDNodeInfo testNodeInfo1 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode1", IWDNode.LEAD_SELECTION).getNodeInfo();

    IWDNodeInfo testNodeInfo2 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode2", IWDNode.LEAD_SELECTION).getNodeInfo();

    testNodeInfo2.setMapping(testNodeInfo1, true);

    testNodeInfo2.addAttributesFromDataNode();

    Hope this helps,

    Please let me know if I have not understood your question properly...

    Regards,

    Vishnu Prasad Hegde

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2004 at 06:42 AM

    Hi Vishnu,

    I've two models. in the same web dynpro component. I'm trying to do model binding for these two with two different model nodes in the context of component controller.

    Is it not possible to bind more than one model in the same component controller?

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 09, 2004 at 01:44 PM

    Yesterday I did the same and it worked fine.

    Which version you are using? I am using the Sneak Preview 6.40 SP 4

    Best Regards

    Renald

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2004 at 01:49 PM

    Hi Satyadev,

    You can definitely bind more than one model in a webdynpro component. There are no such restrictions. I think it should work... Probably if you could send the code snippet, it may help us to trace the problem.

    Regards,

    Vishnu Prasad Hegde

    Add comment
    10|10000 characters needed characters exceeded