kattunga / IWBootstrapFramework

Intraweb Bootstrap 3 Framework for Delphi
http://kattunga.github.io/IWBootstrapFramework
MIT License
98 stars 42 forks source link

Symptom that may indicate a problem. #17

Closed robertonicchi closed 9 years ago

robertonicchi commented 9 years ago

When refreshing a page (F5) where a Tiwbstabcontrol is present the activetab is reset to the default one (the tab that was set at design time or set in the oncreate event of the form).

If a modal dialog is opened (for example using webapplication.ShowMessage or a Tframe) then the active tab won't be changed anymore doing a page refresh.

kattunga commented 9 years ago

That is the designed behavior. Selected page is reported to served side on any async call. If you need to keep your selected page always in sync with the server you can simple set the OnAsyncChange event of the tab with an empty code:

procedure TIWForm2.IWTabControl21AsyncChange(Sender: TObject;
  EventParams: TStringList);
begin
  //
end;

This will force to submit any page change to the server. Note that this will impact on performance on slow connections. This is why is not enabled by default.

Regards