2011/3/17 Bob Schellink <[email protected]>

> Hi,
>
> Does your page have an associated template containing $table? The provider
> is only called when the
> table is rendered.
>
> Yes, it is! [1]


> Also, why not close EM in a filter instead?
>
> Not needed.


> Alternatively use Selenium to perform live testing of your site.
>
> This is a unit test and I'm using it to test page controller and the jpa
integration.

One thing to note[2] : using table's setRowList() method the test pass. That
because, as I've said, that method is
triggered after onDestroy() method.[3]

Regards,

Gilberto

[1]
http://code.google.com/p/construtor/source/browse/trunk/cip/park/src/main/webapp/view-vehicle.htm
[2] http://dl.dropbox.com/u/9093640/log_1.txt
[3] http://dl.dropbox.com/u/9093640/log_2.txt


regards
>
> Bob
>
> On 2011/03/17 19:38 PM, Gilberto wrote:
> > Hi, all!
> >
> > In this [1] simple test I'm using the table.getRowList() - I've set the
> data provider on ViewVehicle
> > constructor - method to check the data load. But the test don't pass
> because that method is
> > triggered after  onDestroy() method :
> > <quote>
> >  ViewVehicle() method
> >
> >
> >  findByLicensePlate() method
> >
> > [EL Fine]: 2011-03-17
> >
> 14:26:00.708--ServerSession(1706726)--Connection(29441291)--Thread(Thread[main,5,main])--SELECT
> > license_plate, color, customer_id, price_table_id, v_type FROM vehicle
> WHERE license_plate LIKE ?
> >         bind => [%%]
> > [Click] [info ] renderTemplate:
> /view-vehicle.htm,/assets/common/template.htm - 82 ms
> >
> >  onDestroy() method
> >
> > [Click] [info ] handleRequest:  /view-vehicle.htm - 6386 ms
> >
> >  findByLicensePlate() method
> > </quote>
> > In the onDestroy() method I close the EntityManager - I'm using the one
> EntityManager per Request
> > pattern.
> >
> > Is there another way I can check if the table control was set up
> correctly?
> >
> > Regards,
> >
> > Gilberto Caetano de Andrade
> > Analista de Sistemas/DBA
> > www.secad.to.gov.br <http://www.secad.to.gov.br>
> > blog.gilbertoca.com <http://blog.gilbertoca.com>
> >
> >
> > [1]
> >
> http://code.google.com/p/construtor/source/browse/trunk/cip/park/src/test/java/park/web/page/ViewVehicleTest.java
>
>

Reply via email to