LazyDataModel Iterator

UI Components for JSF
Post Reply
orko2002
Posts: 44
Joined: 27 Dec 2010, 22:31

31 Oct 2011, 16:59

Hi, i just need to iterate over a lazydatamodel in order to initialize the hibernate lazy collections how can i do that? the iterator always return null

this is what i want to do

Code: Select all


	    //---- Inicializo las listas lazy
	    if (cupones != null) {
	    	Iterator<Cupon> it = cupones.iterator();

	    	while (it.hasNext()) {
	    		Cupon c = it.next();
		    	Hibernate.initialize(c.getApuestas());
	    	}
	    }
i'm trying to initialize the collection on the backbean

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests