2010/12/14 Yinghai Zhao <[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