How does persistence works on custom property views?

I have a page that calls a view with a single parameter: wo_id. This view is basically a series of embedded views that guides the operator trough 4-5 steps until a process is completed. Then it will exit this view (but we are still in the same page) and you can repeat the process for another instance of wo_id.


But somehow, custom parameters that are defined as not persistent, starts with the last view instance value. So for example, n_tab_active should start at 0 always, but somehow it starts at its last instance value. I also tried to write it to 0 with onStartup view events, with and without delay. Nothing works.
Any idea? Thanks!

Right click on n_tab_active and check Persistent. Then save the view. The will make that prop persistent.

I'm not seeing this at all, with or without persistence.
Actually, when not persistent, the property just stops existing, until something gives it a value.

Do you have something, somewhere, writing to this property ?
Bi-directional binding on some component maybe ?

Great point, if the property isn't bound to anything and isn't set for persistent, it will not be visible. I think it still exists though, as far as I know, it just stops displaying itself.

A binding to that non-persistent property will return Bad_NotFound, so it does appear to stop existing.
Which I think would be the point of a non-persistent object - it doesn't persist. If nothing creates it... it doesn't exist.

Create a view with just one custom prop. By default it should be set to persistent. If you remove persistent, close and reopen, the prop isn't visible, but if you look at the JSON it's still in the propsConfig. That's what I meant by it still exists.

I see... I guess it only exists in the view's definition, but is never actually created ? Something like that...

Its being used by embebed views to apply some CSS styling giving the effect of sliding pages. The value itself gets updated via message handler when clicking certain buttons, so no-bidirectional (at least pure bi-directional).

Maybe I formulate wrong the question now that you mention what persistence does. The problem im having is that this custom property saves value of the last instance instead of going to a default value

Where is this View being used? You mention it is embedded, but is that in a Docked View? A Popup?

The hierarchy is as follows:

Page that calls View1 with parameters > View1 with custom properties > Embedded view2 that uses custom property as parameter input and refresh it via messaging when clicking.