OpenUI5 version: 1.120.0
TS Types: 1.120.0
There are a lot of inconsistencies from typescript and API perspective when using sap.m.p13n.Engine.
- Let's start from looking into samples from UI5:

sap.m.p13n.Engine.getInstance doesn't exist in the documentation and types.


MetadataHelper doesn't receive any parameters according to types and documentation


But it does in the code and the UI5 Sample:

SelectionController and the rest of the controller constructor according to types and documentation should receive id first and only then the settings, however, the sample and actual library code is different
Sample code from UI5:

Constructor from TS:

Constructor from documentation:

Constructor in the library itself:

Event handlers doesn't have proper types defined:

Long story short, all p13n Engine topic is unusable from TS perspective.
Additionally it is totally unclear how can I control the state of the Engine:
- How can I provide the list of already visible columns (or maybe already used sorters)? Doesn't seem that something can be passed to
SelectionController, Engine instance doesn't seem to have anything for that as well, except applyState method which is experimental.
- What can be passed to Engine -> show method?

Where did "Columns" and "Sorter" come from? According to documentation they are the keys, but there is no information if those keys are something which is predefined, or maybe I should define them by myself. If they are predefined, what are the values? If they are not, where should I specify them?
Absence of answers on those questions makes usage of the Engine tricky.
My current task is to implement column visibility personalization for Grid Table and we are using version 1.108.*. There are 4 options to do it:
- Using standard
showColumnVisibilityMenu for Grid Table, but it is deprecated since 1.117, so it makes no sense to use it.
- Using p13n Engine, but it is totally broken for TS
- Implementing totally custom Menu with reimplementation of standard menu items, which is recommended by documentation. Funny recommendation if you ask me :)
- Making totally custom p13n dialog.
4 options and all of them are poor. P13n Engine would be the best option, if it would have proper documentation and types.
It would be really nice if this could be fixed as a patch for 1.108.* as well, because I am forced to implement everything fully custom otherwise. Also it would be great if there would be some proper documentation and samples on how to use the Engine, current documentation state, as you can see, is chaotic and unclear.
Thanks in advance!
OpenUI5 version: 1.120.0
TS Types: 1.120.0
There are a lot of inconsistencies from typescript and API perspective when using
sap.m.p13n.Engine.sap.m.p13n.Engine.getInstancedoesn't exist in the documentation and types.MetadataHelperdoesn't receive any parameters according to types and documentationBut it does in the code and the UI5 Sample:
SelectionControllerand the rest of the controller constructor according to types and documentation should receiveidfirst and only then the settings, however, the sample and actual library code is differentSample code from UI5:




Constructor from TS:
Constructor from documentation:
Constructor in the library itself:
Event handlers doesn't have proper types defined:
Long story short, all p13n Engine topic is unusable from TS perspective.
Additionally it is totally unclear how can I control the state of the Engine:
SelectionController,Engineinstance doesn't seem to have anything for that as well, exceptapplyStatemethod which is experimental.Where did "Columns" and "Sorter" come from? According to documentation they are the keys, but there is no information if those keys are something which is predefined, or maybe I should define them by myself. If they are predefined, what are the values? If they are not, where should I specify them?
Absence of answers on those questions makes usage of the Engine tricky.
My current task is to implement column visibility personalization for Grid Table and we are using version
1.108.*. There are 4 options to do it:showColumnVisibilityMenufor Grid Table, but it is deprecated since 1.117, so it makes no sense to use it.4 options and all of them are poor. P13n Engine would be the best option, if it would have proper documentation and types.
It would be really nice if this could be fixed as a patch for 1.108.* as well, because I am forced to implement everything fully custom otherwise. Also it would be great if there would be some proper documentation and samples on how to use the Engine, current documentation state, as you can see, is chaotic and unclear.
Thanks in advance!