Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How not refresh parameter
#1
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'];
Reply
#2
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)