1 2 Previous Next 18 Replies Latest reply on Mar 19, 2010 11:30 AM by rodmen Go to original post
      • 15. Re: recover values rich:dataTable
        harut

        Also post DetallePedidoBBean.java (listaDetalleRegion is the property of that class, if I am not mistaken).

         

        b.t.w. after looking the code in PedidoBBean.java I noticed that there are getter/setter methods which contain some business logic code in their body. That is not prefferable way in such cases (all initialization of the properties should be in action methods...). And the problem of some strange values of some properties might be the result of that logic in the setter methods (in your case listaDetalleRegion is null...)...

        • 16. Re: recover values rich:dataTable
          rodmen

          Hi, Harut

           

          This is the DetallePedidoBBean.java

           

          The methods whit business logic are used to full fill some h:selectOneMenu

           

          Thank you

          • 17. Re: recover values rich:dataTable
            harut

            Hi Rodrigo,

             

                 I have investigated the files you have post. And the logic is not clear for me... I didn't find the part where listaDetalleRegion is initialized so the dataTable will generate as much rows as much elements listaDetalleRegion has... anyway...

            The problem that you get always listaDetalleRegion = NULL is because of following:

            As you mentioned in one of your previous posts you are trying to get that collection by follwing code:

             

            DetallePedidoBBean detallePedidoBean = (DetallePedidoBBean) request.getAttribute("detallePedidoBean");

            listaDetalleRegion = (ArrayList<DetallePedidoBBean>) detallePedidoBean.getListaDetalleRegion();

             

            Each time you are trying to get detallePedidoBean directly from request where it is recreated after any request (because you have defined detallePedidoBean to be stored in the request in your faces-config.xml). And that's why all properties of that class have their initial values (listaDetalleRegion = NULL)...

             

            I can suggest you to implement the logic as I described in one of my previous posts, because currently your code is very complicated....

                 Anyway if you will change the scope of the bean to session, then it will start to work fine (I hope).

             

            Regards.

            1 of 1 people found this helpful
            • 18. Re: recover values rich:dataTable
              rodmen

              All right Harut, thank you very much I’ll try that

              Regards

              1 2 Previous Next