Skip to Content

SAPUI5 - Table Personalization persistence

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Dec 02, 2016 at 06:43 AM

    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/

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 05, 2016 at 06:44 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 05, 2016 at 11:46 AM

    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

    Add comment
    10|10000 characters needed characters exceeded