[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to get top dispatcher from "somwhere"  XML
Forum Index -> Development
Author Message
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

(question by mail - answered via forum)

I upgraded today from 20230731 to the 20240219 and found out that the method "HttpSessionAcccess.getCurrentHttpSession().getAttribute("d")" returns null when before we were getting a dispatcher. (See screenshot)

Can the top dispatcher still be accessed in this way but maybe another key?

Thank you
[Thumb - 2024-02-19 13_42_02-Verfassen_ Re_ How should we get the Top dispatcher from the current Https sessi.png]
 Filename 2024-02-19 13_42_02-Verfassen_ Re_ How should we get the Top dispatcher from the current Https sessi.png [Disk] Download
 Description
 Filesize 14 Kbytes
 Downloaded:  273 time(s)


Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Your way of accessing the top dispatcher is super-dependent on the way JSF stores its session data... Maybe you switched from a default implementation to our mini-implementation?

Nevertheless: if you cannot get the dispatcher by a concrete instance you can access by calling:

Code:
 IDispatcher top = DefaultDispatcher.getDialogSessionInstance();
 


Maybe you write a corresponding method in your dispatcher that returns back the proper class:


Code:
 public class Dispatcher
 {
     public static Dispatcher getDialogSessionInstance()
     {
         return (Dispatcher)DefaultDispatcher.getDialogSessionInstance();
     }
 


Kind regards! Björn

Björn Müller, CaptainCasa GmbH
dperezlopez

Active

Joined: 23/01/2015 14:55:04
Messages: 18
Offline

Aha! I will substitute your more abstract method for "HttpSessionAccess.getCurrentHttpSession().getAttribute("CCDISPATCHER")" just to be future proof. Thank you Björn!

David
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team