Hi!
First time I tried to filter a screen data loader with:
[CDATA[select e from PATIENT_DATA e where (e.height < 180.0) ]
That works fine. But for :session_ data:
[CDATA[select e from PATIENT_DATA e where (e.height < :session_PatientHeight) ]
it does not work, though I of course previously set: sessionData.setAttribute(“PatientHeight”, 180.0);
Is any little thing missing?
Second observation:
I tried to set the described :session_ filter via a RowLevel policy. That works, again! So what’s needed in a screen descriptor, to use :session?
How do you get sessionData instance in your controller?
It should be obtained via ObjectProvider as it shown in docs example: JPQL Extensions :: Jmix Documentation
Also make sure that data loader loads data after the attribute was set for SessionData
ok, will try. I set the sessionData in another screen before.
So there’s no ObjectProvider in the Screen with the loader.
The docs example made me assume, that only for setting sessiondata, the objectProvider would be needed… sorry…
This wrapping into ObjectProvider needed only when injecting to some singleton bean. In UI controller it can be injected directly. Authentication :: Jmix Documentation.