Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

request for suggestion against loadData probl

Help
2009-05-08
2012-12-13
  • manotosh sil
    manotosh sil
    2009-05-08

    I just started Openswinging ! .

    I'm using netbeans.. Created a new project ,added OSwing library. Now Added a DeskTopPane (Swings component and not OSwing MDI ).

    --->Now Drew a OSwing GridControl inside a jinternal frame.(child of that DeskTopPane)
    ---> Creatted a ItemDetailVO extendng valueobject. Then I set gridcontrols valueobject class name to "mypackage.ItemDetailVO"
    ---->Created a ItemDetailGridFrame Controller with loadData method (modified from a demo sample).

    But when I run This Grid Controller doesn't seem to get invoked : (

    Where am I wrong. the debuuger meaaseg is
    [code] Error while fetching data.
    java.lang.NullPointerException
            at org.openswing.swing.table.client.Grids.loadData(Grids.java:1697)
            at org.openswing.swing.table.client.Grids.access$400(Grids.java:58)
            at org.openswing.swing.table.client.Grids$LoadDataThread.run(Grids.java:3717)[/code]

    I find that in few sample demos GridController class is Invoked First then this GController instantiates the Grid Frame

    so the process flow is main-->GridController-->GridFrame

    but in my case GridFrame thats drawn inside the Internal Frame is invoked first  Only then it's constructor calls the GridController..

    Am i wrong here..   Thanks in advance..

     
    • mcarniel
      mcarniel
      2009-05-09

      You have also to bind grid controller to grid control and grid data locator to grid control, through two methods provided by GridControl class:
      - public final void setController(GridController controller)
      - public final void setGridDataLocator(GridDataLocator gridDataLocator)

      See "demo3" sample application...