Grid Persistence
-
- Profound User
- Posts: 61
- Joined: Tue Jun 28, 2016 12:53 pm
- First Name: James
- Last Name: Sherwood
- Company Name: Brunswick Boat Group
- City: Knoxville
- State / Province: Tennessee
- Contact:
Grid Persistence
Is there way to determine if the grid is loading initially (e.g. onload) from a persistence state?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Grid Persistence
Are you referring to the 'persist state' property of the grid?
The grid can't be loaded from that value... that value controls some features, such as sorting, hidden columns, movable columns, etc. But, you still must load the grid either from your server-side program or via the db-driven properties, it can't be loaded from the persist state option.
If you explain what you're trying to achieve, I'll see if I have some suggestions.
The grid can't be loaded from that value... that value controls some features, such as sorting, hidden columns, movable columns, etc. But, you still must load the grid either from your server-side program or via the db-driven properties, it can't be loaded from the persist state option.
If you explain what you're trying to achieve, I'll see if I have some suggestions.
-
- Profound User
- Posts: 61
- Joined: Tue Jun 28, 2016 12:53 pm
- First Name: James
- Last Name: Sherwood
- Company Name: Brunswick Boat Group
- City: Knoxville
- State / Province: Tennessee
- Contact:
Re: Grid Persistence
I have request where the grid will have some columns hidden based on flag set when the grid loads. Because hidden columns can be selected to display I want to maintain the selected columns upon the selections and not be overridden by reload of the grid on the next exfmt (while user is still in program). However, on the next initial load (program startup) I do want it look at the flag to the hide/show columns.
I know the question is why the complexity? It is just how I have so far figured out how to show/hide columns when a program flag is set but show a different set of columns initially when the flag is not set. The users just want to be able to unhide columns while in the program and not persist it without resetting the hidden/filters.
I thought about using a checkbox to allow the users to decide to persist current selections or not but not sure if the persist grid property can be set at run time. If that could work, I would just use that to decide when to hide/show columns based on the flag.
Hope that makes sense.
I know the question is why the complexity? It is just how I have so far figured out how to show/hide columns when a program flag is set but show a different set of columns initially when the flag is not set. The users just want to be able to unhide columns while in the program and not persist it without resetting the hidden/filters.
I thought about using a checkbox to allow the users to decide to persist current selections or not but not sure if the persist grid property can be set at run time. If that could work, I would just use that to decide when to hide/show columns based on the flag.
Hope that makes sense.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Grid Persistence
Not entirely sure I understand. You want the columns to be set to their defaults when the program is first run, but then persist state while they're still in the program?
If so, you could call the clearState() API when they click the button (or function key or whatever) to exit the program and clear the persisted state so that next time they call it again the state will be back to default.
Or, do you mean the opposite? That you want Profound UI to remember the state when the user has left the program so that it'll come back to the same state when they call it again? But, you want the program to control it while the user remains in the program... I've not heard someone ask for that before, I'd have to think about it more.
If so, you could call the clearState() API when they click the button (or function key or whatever) to exit the program and clear the persisted state so that next time they call it again the state will be back to default.
Or, do you mean the opposite? That you want Profound UI to remember the state when the user has left the program so that it'll come back to the same state when they call it again? But, you want the program to control it while the user remains in the program... I've not heard someone ask for that before, I'd have to think about it more.
-
- Profound User
- Posts: 61
- Joined: Tue Jun 28, 2016 12:53 pm
- First Name: James
- Last Name: Sherwood
- Company Name: Brunswick Boat Group
- City: Knoxville
- State / Province: Tennessee
- Contact:
Re: Grid Persistence
Scott,
I didn't know about the clearState() API. Been looking at the documentation for that this morning. There's a possibility I may be able to use that in my logic to get to what I am trying to do.
This wasn't anything I was thinking but I have been asked about this a couple times previous to my current task. That brings up a real good thought. Is the state being captured as the grid is active and users are interacting with it? Or, does the state get captured upon exit? If there were a way to save a "copy" so to speak before showing the grid and have the option of restoring the original upon exist, that adds a lot of flexibility for the users. I see a huge value for the UX experience where the user can decide to capture their current custom layout or defer to the original custom layout.
Btw, thank you for your patience with the forum users when we are trying to explain things. You are a great asset to Profound and to the IBM I community as a whole.
I didn't know about the clearState() API. Been looking at the documentation for that this morning. There's a possibility I may be able to use that in my logic to get to what I am trying to do.
Scott Klement wrote:Or, do you mean the opposite? That you want Profound UI to remember the state when the user has left the program so that it'll come back to the same state when they call it again? But, you want the program to control it while the user remains in the program... I've not heard someone ask for that before, I'd have to think about it more.
This wasn't anything I was thinking but I have been asked about this a couple times previous to my current task. That brings up a real good thought. Is the state being captured as the grid is active and users are interacting with it? Or, does the state get captured upon exit? If there were a way to save a "copy" so to speak before showing the grid and have the option of restoring the original upon exist, that adds a lot of flexibility for the users. I see a huge value for the UX experience where the user can decide to capture their current custom layout or defer to the original custom layout.
Btw, thank you for your patience with the forum users when we are trying to explain things. You are a great asset to Profound and to the IBM I community as a whole.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Grid Persistence
It is updated as the user is actively interacting with the grid and saved into the browser's localStorage. When the screen is re-drawn, the localStorage settings are retrieved and used to set things up the way they were previously.James-S wrote:Is the state being captured as the grid is active and users are interacting with it? Or, does the state get captured upon exit?
If I understand you correctly, you'd capture the persistent settings when the program first loads, and when exiting you'd have the option to revert to the original persisted settings or else to keep any changes the user had made. Sort of like hitting the cancel button to undo any changes that had been made during the active session?James-S wrote:If there were a way to save a "copy" so to speak before showing the grid and have the option of restoring the original upon exist, that adds a lot of flexibility for the users. I see a huge value for the UX experience where the user can decide to capture their current custom layout or defer to the original custom layout.
It may be possible to do something like that. Starting with the latest build of Profound UI (ver 6, fix pack 7.0) there's a feature called PUI_SERVER_STATE that causes the state of everything to be written to a physical file on IBM i when you exit the screen. It then can be loaded when you return to the screen again. I suppose its potentially possible for your RPG program to modify that physical file.
This is a new feature, so I'm sure nobody has experimented with doing this yet. There's some more information here:
https://docs.profoundlogic.com/display/ ... e+on+IBM+i
My pleasure!James-S wrote:Btw, thank you for your patience with the forum users when we are trying to explain things. You are a great asset to Profound and to the IBM I community as a whole.
-
- Profound User
- Posts: 61
- Joined: Tue Jun 28, 2016 12:53 pm
- First Name: James
- Last Name: Sherwood
- Company Name: Brunswick Boat Group
- City: Knoxville
- State / Province: Tennessee
- Contact:
Re: Grid Persistence
Thanks for the info. We are currently trying to move away from 6.2.0. We are in the process of moving to 6.4.0 because of an issue we found with saving XML data from Fusion Charts 3.13.0. We reported it to them a few weeks ago and I just asked about it again today. Asked if 3.15.0 addressed the issue which would allow us to move to Profound 6.6.0.
Who is online
Users browsing this forum: No registered users and 3 guests