pbOverrideStateOnShow - cWebWindow

Determines whether view is instantly synchronized on Show

Type: Property

Access: Read/Write

Data Type: Boolean

Parameters: None

Syntax
 Property Boolean pbOverrideStateOnShow

Read Access: Get pbOverrideStateOnShow to BooleanVariable
Write Access: Set pbOverrideStateOnShow to BooleanVariable/Value


Description

If this property is set to True, a view / dialog immediately becomes in sync as soon Show is sent.

So instead of going back to the client to see if the view / dialog was already being loaded, it immediately marks the view as being synchronized.

For this it performs the necessary operations (check rights, clear Data Dictionary Objects (DDOs), rebuild constraints). This means that you can immediately perform finds on the DDOs and their state will simply override any existing state that might have been on the client already.

So we don't need to store values in web properties and then perform the actual finds in OnShow anymore.

Default Value:
- Desktop-style cWebView : False
- Drill-down cWebView: True
- cWebModalDialog : always True, regardless app style


Switching Between Views and Dialogs

In desktop-style view navigations, the web properties set within a view are maintained when you switch between views. It is clear that this is the behavior you'd want with these kinds of views, as it allows you to switch between views without losing content. The key word here is switch.

With modal-dialogs (desktop style or drill-down), web property changes are not maintained across multiple invocations. In this case, you are not switching view, you are invoking a dialog and then conceptually closing it. The next time you invoke it, you are starting over. When starting over, all web properties are reset to their original value. The reason we do it this way is that this is the most controlled mechanism for handling dialogs. If the old web property contents were maintained (which would include data in forms, etc.) you would end up with whatever just happened to be in that last view. To make this more complicated, some web properties are being set by the server during the invocation and others are "left over" on the client. This is hard to control. We would advise that you WebSet your web properties each time the object is being invoked.

Drill-down views behave the same as modal dialogs. You can think of them as being invoked and then closed. When closed, you start all over. This is even more important with drill-down views, because the same view may be invoked from a number of different places in a breadcrumb, where they may do very different things. This makes the "left-over" client properties seem even more confusing.

There is a property that controls this - pbOverrideStateOnShow. By default, it is set to False in desktop-style views and set to True with modal dialogs and drill-down style views. If you set this to False, you will get the persistent web property value behavior. You will also have to deal with the "left-over" property value issue just discussed. Our advice would be to not change this property and to use the OnNavigateForward event or OnShow to set these properties during each invocation.