CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Sub Menu Items Problem

by Aggie85 » 12 Mar 2014 18:49

Howdy All!

If a root menu item (top) has submenu items, opening the root item causes a NEW SESSION INSTANCE!!! This also happens in the JQueryDemoIW_V2 y'all supply.

How can I fix this? I need to keep within the same active session.

Thanks in advance!

Aggie85
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24

by Alexander Bulei » 12 Mar 2014 19:29

Hi Aggie85,

We can't confirm it!
Check your code, maybe you have OnClick assigned on that menu item with Ajax = False.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Jorge Sousa » 12 Mar 2014 19:33

we noticed that

Intraweb creates a new session if the links are invalid, but thats not our responsability.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 12 Mar 2014 19:41

Also

We found out that in these cases, Intraweb creates a temporary session, that is destroyed immeadiatelly after the request for a unexistent file is created

And also, that's why we've in our demos the following in ServerController.OnNewSession

procedure TIWServerController.IWServerControllerBaseNewSession(ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
if GSessions.IsValidSession(ASession) then
ASession.Data := TIWUserSession.Create(ASession);
end;
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 12 Mar 2014 19:52

We found out that in these cases, Intraweb creates a temporary session, that is destroyed immeadiatelly after the request for a unexistent file is created

And also, that's why we've in our demos the following in ServerController.OnNewSession

procedure TIWServerController.IWServerControllerBaseNewSession(ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
if GSessions.IsValidSession(ASession) then
ASession.Data := TIWUserSession.Create(ASession);
end;


All of this only happens in IW12
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Aggie85 » 12 Mar 2014 20:16

Thanks for the quick answer but I still think this is a bug somewhere.

Just do the following:

1) Compile and run your demo JqueryDemoIW14_V2.
2) Set a break point in the ServerController's OnNewSession event.
3) Click on the Menu item in the accordion panel.
4) Click on any of the root items #2 to #4 to drop down the submenu.

You will see a new session started. This cannot be right or it honestly makes the submenu feature practically useless for most session based apps!

If you client to open Root 1 submenu on your demo, it does NOT cause a new session to open!

Again, this is y'alls UNMODIFIED / RUNNING demo application (no changes by me)!

Thanks,

Aggie85
Last edited by Aggie85 on 12 Mar 2014 20:18, edited 1 time in total.
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24

by Jorge Sousa » 12 Mar 2014 20:17

Ok

Final conclusion:

Both in IW12 and IW14, if we set ServerController.AllowMultipleSessionPerUser = True

It creates new sessions when the link to be served is invalid, any link, any control

In IW12, it creates a temporary session, and we can use not GSessions.IsValidSession to determine that it's a temporary session, and the session is destroyed immeadiatelly after the bad link request is processed.

IW14, doesn't have the concept of temporary sessions anymore, so it creates a normal session that will be only destroyed when it's timeout period is reached.

The follow demos were submitted to our friend Alexandre Machado @ Atozed.

I rest my case!
You do not have the required permissions to view the files attached to this post.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Aggie85 » 12 Mar 2014 20:29

cgdevtools_support wrote:Ok

Final conclusion:

Both in IW12 and IW14, if we set ServerController.AllowMultipleSessionPerUser = True

It creates new sessions when the link to be served is invalid, any link, any control

In IW12, it creates a temporary session, and we can use not GSessions.IsValidSession to determine that it's a temporary session, and the session is destroyed immeadiatelly after the bad link request is processed.

IW14, doesn't have the concept of temporary sessions anymore, so it creates a normal session that will be only destroyed when it's timeout period is reached.

The follow demos were submitted to our friend Alexandre Machado @ Atozed.

I rest my case!


I will try in my code to have an event set... I was just experimenting when I noticed the new session. That is why I went and ran the unmodified version of y'alls demo. If I can fix it with a valid OnClick event, then great. If not, I will have to come up with a different solution for the short time because I can't be creating new sessions that will eventually time out for what I am trying to use it for.

Thanks for the help and explanation.

Aggie85
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24

by Jorge Sousa » 12 Mar 2014 20:38

Now about the Menu Items

The problem is that when you don't define an image, it's setting itself a link to /blank.gif

Please copy wwwroot/css/blank.gif to wwwroot/blank.gif while you wait for a next release

However we've indications from Atozed that they already fixed this for the next new version.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Aggie85 » 12 Mar 2014 20:44

cgdevtools_support wrote:Now about the Menu Items

The problem is that when you don't define an image, it's setting itself a link to /blank.gif

Please copy wwwroot/css/blank.gif to wwwroot/blank.gif while you wait for a next release

However we've indications from Atozed that they already fixed this for the next new version.


Funny how things work! I was just getting ready tell tell you how to "fix" the problem as I have been experimenting and found that if a submenu item's image didn't have any value, it caused the problem!!!

Well, like I said before, as long as I know how to fix a problem, I am happy to be able to move on!

Thanks,

Aggie85
Aggie85
 
Posts: 273
Joined: 15 May 2013 02:24


Return to JQMenu

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.