cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 - Table Personalization persistence

SandipAgarwalla
Active Contributor
2,246

Hello

We are currently using a sap.m.Table with the Table Personalization Dialog where the users can hide/show the columns of their own choice. Now how do we persist the data in the backend? I am not looking to persist it on the front end, but backend.

Are there standard services available in fiori UI-AddOn which can persist it?

Any pointers would be helpful.

Thanks

Sandip

Accepted Solutions (0)

Answers (3)

Answers (3)

kammaje_cis
Active Contributor

Hi Sandip,

I have not used it, but it seems like you can achieve it using control sap.ui.comp.variants.VariantManagement for this.

https://experience.sap.com/fiori-design-web/ui-components/variant-management/

Just to quote from above link

The variant management control can also store table settings (layout, column visibility, sorting, or grouping) independently of the filter settings.

Currently it seems like you might have to create your own OData service entity for storing it in backend.

You may also check this.

https://blogs.sap.com/2015/12/29/variant-management-implementation-guide-ui5/

SandipAgarwalla
Active Contributor
0 Kudos

Sure Krishna

Give it a try and let me know. I guess this service works only if you are in Fiori Launchpad.

In my case, the app is standalone and integrated in a different portal.

thanks

Sandip

SandipAgarwalla
Active Contributor
0 Kudos

Thanks Krishna

Yes Variant Management is an option. But I was looking if there is any standard service available for backend persistence.

There is a fiori personalization service

// Get a personalization service provider from the shell 
var oProvider = sap.ushell.Container.getService("Personalization").getPersonalizer(oPersId);

// Instantiate a controller connecting your table and the persistence servicvar oTablePersoController =new sap.m.TablePersoController({
    table: oTable,
    persoService: oProvider
}).activate();

But I not sure if it persist the changes in the backend?

Thanks

Sandip

kammaje_cis
Active Contributor
0 Kudos

Yeah, having a SAP provided service would be great.

I feel above personalization service would work. This is the same service which takes care of Fiori Groups personalization. I too have a requirement and would be trying this soon. Will let you know if this works.

0 Kudos

Hey Krishna,

Did this work?

Thanks again,

Nathan