Refreshing a view object after data external change
942746Apr 27 2013 — edited Apr 29 2013Hi
I'm trying to refresh a viewobject based on a read-only query, the table data used on the query are updated by an other application
the problem that the view don't refresh its data from the database, it return always the same value
(but after leaving the page to another then getting back to my page the data is refreshed)
my code (periodically called by a poll):
vo.reset();
vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
vo.setpIdUser(1);
vo.executeQuery();
if(vo.getRowCount()>0) {
r = (PosInstantaneRowImpl)vo.getCurrentRow(); //always just 1 row is returned
if(r.getIdtracking()!=null) {
val = r.getIdtracking();
System.out.println("Idtracking1: "+val); //print always the first value retrived when the page is loaded
}
}
i'm using JDev 11.1.1.2.0
database: mysql 5.2.11
ms windows 7
thanks for help.