Skip to Content

Node Binding error

Hi All,

I am facing node binding error. Please someone help me. I wrote following code.

Zhr_Str_Employee_Rel eno = new Zhr_Str_Employee_Rel();

wdContext.nodeIt_Emp_No().bind(eno);

eno.setEmp_No(wdContext.currentOutput_usernameElement().getEmployeenumber());

IPrivateZsubordinatesView.IIt_Emp_NoNode empno = null;

empno.bind(eno);

when i run the application I am getting folllowing error.

com.sap.tc.webdynpro.progmodel.context.ContextException: Node(ZsubordinatesView.Zhr_Fm_Relations_Down_Input.Output.It_Emp_No): cannot bind or add elements because the node has no valid parent

It seems that I am going somewhere wrong. Please someone help me.

Thanks

Uday

Edited by: Uday Kumar Kanike on Jan 12, 2012 1:00 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 12, 2012 at 12:14 PM

    Is the parent node element of the node you want to bind already created?

    You can only add elements to child nodes when all parents are bound and have at least one element.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Arun,

      Finally it worked. Thanks to all who helped me.

      Following are the final lines of code I wrote which worked.

      for( int i=0; i<wdContext.nodeOutput_username().size();i++)

      {

      inp2.setI_Im_Report("x");

      //inp2.setI_Ad_Report("x");

      //inp2.setI_Bh_Report("x");

      //inp2.setI_Fh_Report("x");

      //inp2.setI_Hr_Report("x");

      //inp2.setI_It_Report("x");

      //String empnumber = wdContext.currentOutput_usernameElement().getEmployeenumber();

      Zhr_Str_Employee_Rel eno = new Zhr_Str_Employee_Rel();

      eno.setEmp_No(wdContext.currentOutput_usernameElement().getEmployeenumber());

      inp2.addIt_Emp_No(eno);

      wdThis.wdGetZsubordinatesCompController().executeZhr_Fm_Relations_Down_Input();

      }

      Thanks

      Uday