Welcome! Log In Create A New Profile

Advanced

[WB2025] - Using a page-table more than once

Posted by JP 
JP
[WB2025] - Using a page-table more than once
December 15, 2025 03:46PM
Hi All

I am trying to do something which I'm sure others must have achieved so I hope there is a solution.

1) I have a page which contains a table. The table can just list some items or names, whatever.

2) I click a button and it opens this page in a new browser tab and the table gets populated.

3) Now I want to open the page a second time in a another browser tab and populate it with some other data.

4) I click the button and again the page opens in a new tab and get populated with some other names/data.

So far it all looks OK, I have 2 browser tabs, each with a table populated with its own data.

Problem:

If I scroll the first table then all the row items change to the content of the second table that I opened !

Conclusions:

These tables are obviously not independent, separate tables. I have found they share the same Alias. I can change the table name using ControlClone() for example, but the Alias property stays the same even for the cloned control. I assume therefore that if the Alias of both tables is the same then they reflect the same data, which is the last data I processed.

Questions:

If I re-create this table as a template control, and use the template control on the page, do you think this would solve the above problem?

Or, has anyone else done this i.e. create a system where a user can open multiple copies of a page but have each page contain its own data?

Comparison to WinDev:

In WinDev one can open many instances of the same window, containing a table and other controls, and each window retains its own data - one window does not affect the other. That's the effect I am trying to create in WebDev.


TIA
Re: [WB2025] - Using a page-table more than once
December 15, 2025 05:21PM
Greeting
Is your table linked to a data source?
Try storing the data in memory, for example an array or similar
pao
Re: [WB2025] - Using a page-table more than once
December 15, 2025 05:23PM
Check the explanation of the context of pages [WB] and windows [WD] in the help.

[doc.windev.com]

Regards

Paulo Oliveira



Edited 1 time(s). Last edit at 12/16/2025 01:17PM by pao.
JP
Re: [WB2025] - Using a page-table more than once
December 15, 2025 06:30PM
Hi Infos,

No the table is not linked to anything. I populate it in code. I think Pao has pointed to the problem.

Thanks
JP
Re: [WB2025] - Using a page-table more than once
December 15, 2025 06:31PM
Thanks Pao,

I see that this is likely the problem. The page load creates the context and subsequent instances use the same context. We have decided to use an alternative method. Always another way ...

Thanks
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: