Hi Gilberto,

The Click example you refer to works as expected. If I Click the delete action, 
the row is removed
when I next view the page.

Try and select your records directly after deleting one and see it you get the 
right results.
Doesn't JPA support muliple levels of caching? Maybe one of the other caches 
are still in play.

regards

Bob


On 15/12/2010 12:37, Gilberto wrote:
> 
> 
> 2010/12/14 Yinghai Zhao <[email protected] <mailto:[email protected]>>
> 
>     when I added or remove a course and updated the database in the submit 
> listener, i call onRender
>     to fetch the data from database and repopulate the table.
>     It seems the table is not always refreshed correctly, Am I doing it write 
> with onRender method?
> 
> I'm seeing similar problem, but using the table search pattern[1], setting up 
> the dataprovider -
> below - in the page constructor[2]:
> <quote>
> 
>         table.setDataProvider(new DataProvider<NaturalPerson>() {
> 
>             public List<NaturalPerson> getData() {
>                 Map<String, String> map = new HashMap<String, String>();
>                 map.put("name", "%" + nameField.getValue() + "%");
>                 return (List<NaturalPerson>)
> naturalPersonService.findByNamedQuery("NaturalPerson.findByName", map);
>             }
>         });
> </quote>
> 
> I've thought that it was a JPA cache issue, but disabling the jpa cache 
> didn't fix the problem.
> 
> Regards,
> 
> Gilberto
> 
> [1]http://click.avoka.com/click-examples/table/search-table.htm
> [2]http://code.google.com/p/construtor/source/browse/trunk/cip/park/src/main/java/park/web/page/ViewNaturalPerson.java?r=747

Reply via email to