09-15-2021, 11:43 AM
My case:
with THandlers.Add('', 'form1', TContentForm.Create(TForm1)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
with THandlers.Add('', 'form2', TContentForm.Create(TForm2)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
Both Forms have mastertemplate.html. I this template dynamic Javascript in div create Bootstrap mega menu depending of language user.
mastertemplate.html <div id="menu"></div>
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA fill this div with timer in tform1 and tform2. This work. I can not refresh this template OnCreate or OnShow thats why timer in form.
<div id="menu">
<ul>
<li><a href="form1">Form1</a></li>
<li><a href="form2">Form2</a></li>
</ul>
</div>
RefreshTemplate function is define in UserSession and run in timer individual form.
If i have open Form1 and click again link to form1 then load mastertemplate empty div for menu!
Is a change only refresh mastertemplate for all forms?
with THandlers.Add('', 'form1', TContentForm.Create(TForm1)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
with THandlers.Add('', 'form2', TContentForm.Create(TForm2)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
Both Forms have mastertemplate.html. I this template dynamic Javascript in div create Bootstrap mega menu depending of language user.
mastertemplate.html <div id="menu"></div>
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA fill this div with timer in tform1 and tform2. This work. I can not refresh this template OnCreate or OnShow thats why timer in form.
<div id="menu">
<ul>
<li><a href="form1">Form1</a></li>
<li><a href="form2">Form2</a></li>
</ul>
</div>
RefreshTemplate function is define in UserSession and run in timer individual form.
If i have open Form1 and click again link to form1 then load mastertemplate empty div for menu!
Is a change only refresh mastertemplate for all forms?