1 Reply Latest reply on Jun 24, 2008 3:39 PM by Mikael Andersson

    why method calling many times?

    Khilesh Prasad Newbie

      Hi everyone,
      getBookings() method calling many times, any one help me how to handle this part,


      @Name("bookingManager")
      
      @Scope(ScopeType.SESSION)
      
      public class BookingManager {
      
      
         public List<Booking> getBookings() {
      
             findAllBooking();
      
            return createBookingList();
      
         }
      
      
         @Create
      
         public String findAllBooking()
      
        {
      
         Query query = em.createQuery("from Booking as booking" );    
      
          bookings = query.getResultList();
      
        }
      
      }




      <f:subview rendered="#{bookingManager.bookings}">
      
      <h:dataTable value="#{bookingManager.bookings}">
      
      </h:dataTable>
      
      </f:subview>



      any one suggest me ...........