cancel
Showing results for 
Search instead for 
Did you mean: 

Personalization for tables in HTML Container for SAP UI5 application

santosh51
Advisor
Advisor
0 Kudos

Hi Team

I have an application with an HTML container and the content for this HTML container comes from the backend.

The content can have multiple tables and I am able to generate a custom button against each HTML table & handle the personalization at runtime by providing a custom dialog to user for columns selection & based on the selections, I would set/remove the "hidden" class against columns at runtime.

The problem now is that there could be some actions that could refresh the application. It means the application will fetch & load the HTML data from the backend and the user will have redo the table personalization again. 

Could you help how to persist the user personalization for this scenario?

I was going through some of the blogs that used iapp-state to achieve similar functionality but they would modify URL to save the iapp-state which I want to avoid as it affects the design of my existing complex application.

Thanks in advance

View Entire Topic
sajid-khan
Explorer
0 Kudos

It sounds like you want to save the configuration settings so they're remembered even after you refresh the page. Have you considered using JavaScript's localStorage for this purpose? It's a great way to store data locally on the user's browser for persistence.

santosh51
Advisor
Advisor
0 Kudos
yes, I had considered it initially & implemented it as well easily. But this solution is actually not recommended as there will be limitations due to browser memory availability & also data privacy risk.
sajid-khan
Explorer

@santosh51

That's a valid concern! LocalStorage might not be ideal if data may contain private user information. 

As an alternative, you can use sessionStorage api. It's similar to localStorage, but data gets cleared when the user closes the browser tab or window. This is a good option for temporary configurations that don't need to persist across sessions. However, If you require data to be available across multiple sessions, consider storing it on your server's backend. This ensures a more secure and persistent storage solution for sensitive information.

santosh51
Advisor
Advisor
0 Kudos
Ok, let me have a look at sessionStorage api. But still this would remain as a last choice for me as there will be limitations due to browser memory. The know that the application is being used in small and big devices and so I believe the memory limitations will be there.