|
<< Click to Display Table of Contents >> Navigation: Forum > How not refresh parameter |
03-28-2023, 07:45 AM:
If directly (first) write URL http://localhost/details?number=1 then read details
and then change URL http://localhost/details?number=2 and then not read details! I have to close browser it work.
Where/How do I need to read the URL parameter again? What wrong in my code?
My code:
IWServerControllerBaseConfig ->
with THandlers.Add('', '/Details', TContentForm.Create(TDetailsForm)) do
begin
CanStartSession := true;
RequiresSessionStart := false;
end;
IWServerControllerBaseGetMainForm ->
if WebApplication.RunParams.Count>0 then
begin
if UserSession.param= 'number' then
vMainForm:=TDetailsForm.Create(WebApplication)
else
vMainForm:=TDetailsForm.Create(WebApplication);
end else
vMainForm:=TMainForm.Create(WebApplication);
TDetailsForm.IWAppFormShow ->
if (WebApplication.RunParams.IndexOfName('number') <> -1) then
UserSession.param := WebApplication.RunParams.Values['number'];
04-10-2023, 12:27 AM:
RunParams is a property that is only set once when the session starts. If you want to read any URL parameter received in any request at any time use
WebApplication.Request.Params property.
On the other hand, if you use WebApplication.RunParams property, you will get the parameters that were sent to IW application when that specific session started, if any.