Keep Layout State and Keep Layout Storage

Author: gianni.sandigliano@unifacesolutions.com (gianni)

In Uniface 9.6.X603 an issue solved is described as: ****************************************************************************************************************************** 30581 If KeepLayoutState is False for a Form but True for a Grid in the Form, the Grid Layout State is Stored at Instance Level in the Registry but only if the Instance Name has not been generated by Uniface. In other words Uniface behave as if Layout State Storage is set to Instance. ****************************************************************************************************************************** We feel an issue we currently have is connected to this bug/solution but from the description of the solution we are not able to understand which was the wrong behaviour and which is the correct-ed one.

What we need to achieve in our forms including a grid is to be able to save  the state at component level while currently is saved at instance level.

Could someone please help us to clearify:
1) Which is the Uniface behaviour after the implementation of solution for issue #30581 in patch X603
2) What is is better to do to implement Layout State Storage at component level for all our forms with a grid in it

Thanks in advance!

Ciao,
Gianni

1 Comment

  1. gianni said 1) Which is the Uniface behaviour after the implementation of solution for issue #30581 in patch X603

    It is now possible to store the layout of a Grid independently of the layout of a Form. Before issue #30581 was fixed the Grid layout could only be stored if the Form layout was enabled as well (Window property "Keep Layout State"/KeepLayout=True). Now the Grid layout will be stored if the KeepLayout property of the Grid is set to True and False for the Form. And in this case the Window property "Layout State Storage" (LayoutStorage) will implicitly use the value "INSTANCE". I guess you have to keep in mind here that with the fix for issue #30581 it is necessary to disable the KeepLayout property of both the Form AND the Grid in case you do not want to preserve the Layout of the Grid.

    gianni said 2) What is is better to do to implement Layout State Storage at component level for all our forms with a grid in it

    If you only want to use LayoutStorage=COMPONENT then you need to enable KeepLayout for both the Grid AND the Form (and set LayoutStorage accordingly). Please note that it was a conscious decision to set LayoutStorage=INSTANCE if the Grid is using KeepLayout=True and the Form KeepLayout=False. In case you reuse the same component for several screens then the end user (probably) does not expect that changing the Grid layout on one screen will influence the Grid layout on the other screens (that use the same Form component) as well. Hope this helps. Kind regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)