Skip to Content
1

SAPUI5 - Table Personalization persistence

Dec 01, 2016 at 06:02 AM

702

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Krishna Kishor Kammaje
Dec 02, 2016 at 06:43 AM
1

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/

Share
10 |10000 characters needed characters left characters exceeded
Sandip Agarwalla Dec 05, 2016 at 06:44 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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
Krishna Kishor Kammaje

Hey Krishna,

Did this work?

Thanks again,

Nathan

0
Sandip Agarwalla Dec 05, 2016 at 11:46 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded