1 Reply Latest reply on Oct 23, 2010 3:09 AM by hantsy bai

    Encountered NullPointerException which useing a customsized DataTableDataModel and Rich:extendedDataTable Data

    hantsy bai Master

      The action code is like the following...
      public class MyAction {

      private ExtendedTableDataModel<Addressee> addresseeDataModel;
      //getters and setters
           private EntityManager em;

      public void createAddresseeDataModel() {
        this.addresseeDataModel = new ExtendedTableDataModel<Addressee>(new DataProvider<Addresee>(){

      //in the implemetation method... I use em for pagination implmetation...but it caused the NPE....


      I call createAddresseeDataModel in @Begin method and getAddresseeDataModel, but got  a NUllPointerException in DataProvider implemetation...It seems it can not found the injected EntityManager in the action class....

      Any help is welcome....