cuba-platform / documentation

CUBA Platform Documentation
https://www.cuba-platform.com
Creative Commons Attribution 4.0 International
26 stars 45 forks source link

Describe custom magic parameters in JPQL queries in CUBA 7 GUI API #633

Open alexbudarov opened 4 years ago

alexbudarov commented 4 years ago

Description of the bug or enhancement

Question from forum:

Will 7.2 support accessing the session info (the user details, for example) directly on the screens? This has been missing in action for quite some time.

After looking into snapshot of developer's manual and github issue list, I failed myself to understand what is the situation in the new CUBA 7 GUI API. What is supported and what is not.

1) Developers manual has this wonderfully detailed section: "3.6.2.2.2. Query Parameters", but it is only for legacy API. There is no analogue for new API. Can we re-write the same page for new API?

2) ":session$userGroupId" in the manual is mentioned in code examples. But is not described formally.

3) I saw this ticket in github: https://github.com/cuba-platform/cuba/issues/2184 But it doesn't contain "what actually has been done", no information what is the full list of supported parameters.

4) This page: http://cubadev:8181/manual/gui_Filter.html (3.5.2.1.18. Filter) contains links to obsolete legacy-gui pages:

Screen parameters, session attributes and screen components including those showing other parameters can be used in JPQL expression. Query parameters specification rules are described in Dependencies Between Data Components and CollectionDatasourceImpl Queries.

5) Also if we support :session$userLogin in filter conditions, why not supporting the same parameters in dataLoader query? It doesn't feel right.