PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → AJAX Table forces AWP page to double initialize, how to disable this?
AJAX Table forces AWP page to double initialize, how to disable this?
Débuté par Aybars Morali, 21 mar. 2008 10:48 - 1 réponse
Posté le 21 mars 2008 - 10:48
Hi all,

I am using AWP pages and AJAX tables. I have noticed the problem before while debugging the code with info() and error() functions. For example, I put my fill_table() function to the page initialization, then I noticed that it runs twice. Now I decided to describe and solve this problem, because it is very crucial, I am fetching lots of data from DB and it will make the performance to its half.

Now, I put info("initialization of X") where X is the name of the control to each controls server initialization code.

if page is AWP and table is AJAX the output is:
global declaration of page
initialization of page
initialization of table
initialization of combobox1
initialization of edt1
initialization of edt2
initialization of combobox2
global declaration of page
initialization of page
initialization of table
initialization of combobox1
initialization of edt1
initialization of edt2
initialization of combobox2

if page is NOT AWP and table is AJAX the output is:
global declaration of page
initialization of page
initialization of table
initialization of combobox1
initialization of edt1
initialization of edt2
initialization of combobox2

if page is AWP and table is NOT AJAX the output is:
global declaration of page
initialization of page
initialization of table
initialization of combobox1
initialization of edt1
initialization of edt2
initialization of combobox2

So, obviously there is a problem I think. I also put an info() to my data fetching function, it says twice that it got 54 records. When project will be used in the future really, tenth of users will fetch thousands of records and I don't want my db to work twice as hard as before.

During first tour of initialization the default AJAX progress bar (in fact not progress bar, the cute clock image at the center of the table) runs. When the second initialization tour begins (with the global decleration of page) it stops. I have nothing in the table's initialization code.

Does anyone have any idea?
Posté le 24 avril 2008 - 12:56
Yes the same here WB12 last version !!!!