elGringo Posted March 27, 2016 Posted March 27, 2016 Hello guys! Tried to emulate opening a new page in the following way Click to go "another page" procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS('window.location=''http://localhost:8077/?page=AnotherPage '' '); end; MainForm.OnShow procedure TMainForm.UniFormShow(Sender: TObject); begin if UniApplication.Parameters.Values['Page']='AnotherPage' then begin UnitAnotherPage.AnotherPage.Visible:=true; Self.Visible:=false; end; end; And everything good but! If in the browser to press BackButton UniGUI writes Invalid session or session Timeout. Restart application So any ideas? How to just back to the MainForm? Quote
Administrators Farshad Mohajeri Posted March 28, 2016 Administrators Posted March 28, 2016 UniSession.AddJS('window.location=''http://localhost:8077/?page=AnotherPage '' '); Doing so will create a New session and old session will be discarded. Quote
elGringo Posted March 28, 2016 Author Posted March 28, 2016 So, no way to emulate pages with UniGUI? To use back and forward buttons? It is a habbit for many people to use this buttons, if we show another form to user and he wants to back to the previous form, pressing the button - he goes to another page - not UniGUI maybe, so did you meet such situations, how do you manage them? Quote
elGringo Posted March 28, 2016 Author Posted March 28, 2016 I feel decision must be, even if not at the moment, than I wish this feature to be in the future in UniGUI. Quote
FastCards Posted March 30, 2016 Posted March 30, 2016 I feel decision must be, even if not at the moment, than I wish this feature to be in the future in UniGUI. I felt the same when I started with UniGUI. Now, 3 years later, it's just something that I have accepted and moved on. Farshad has made it pretty clear that making the back button work as per traditional websites is a non-starter. You can set BackButtonAction to bbWarnUser. If you do this and the user clicks the Back Button, they get a warning that they will be leaving the site if they proceed. Works for me and my users. Also, if people ask I tell them that the Back button is yesterday's technology and that my software is modern, cutting edge using SPA. 1 Quote
elGringo Posted March 30, 2016 Author Posted March 30, 2016 Andy, Zilav, Farshad thank you for your answers and opinions, so any technology has its limitations anyway. Just if you ask your friends do they use back button or not 9 of 10 will answer yes I think so. Of course for the moment I will tell users "Dont press back button or something bad will happen, but i think it is temporary decision" But anyway even if we have one page that is very powerful page)) Full of Delphi spirit and power. And in all other Aspects UniGUI is very clever and well done framework! Hope in future we will have pages anyway))) Regards and good luck to all!!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.