Entering content frame

Procedure documentation Supplying the Context with Data

Use

You have to supply the business graphic’s context with data. You can do this in the wdDoInit method (or in a supply function) in the controller.

For more information read the Structure linkdocumentation on the supply function.

 

Procedure

To generate the coding for the implementation of the controller click the button Implementation.

Enter the following coding in the method wdDoInit. Make sure you enter the coding in the user coding area, that is, between the characters //@@begin wdDoInit()and //@@end.

/** Hook method called to initialize controller. */

  public void wdDoInit()

  {

    //@@begin wdDoInit()

    IPrivateSimpleGraphicsView.IANode aNode = wdContext.nodeA();

   

    IPrivateSimpleGraphicsView.IAElement elm;

    for (int i = 0; i < 10; i++)

    {

      elm = wdContext.createAElement();

      elm.setCategoryText("Kategorie " + i);

      elm.setSeries1Value(i);

      elm.setSeries2Value(10 - i);

      aNode.addElement(elm);

    }

    //@@end

  }

 

 

Result

You have now implemented the method wdDoInit. It fills the context with data when the controller is initialized.

  

  

Leaving content frame