Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What is a "persistent item"?

Eric Olson 1Sep 27 2018 — edited Sep 27 2018

I've just finished debugging a strange problem in a page process that was giving incorrect results because a page item had the wrong value. We discovered this page item value was getting set as soon as the user's session was created and even before he loaded that page. The V() function would return a value for this item even when there was no value in WWV_FLOW_DATA.

Eventually, I turned on session tracing and found this when V('P1_ITEM') was being called:

SELECT ATTRIBUTE_VALUE FROM WWV_FLOW_PREFERENCES$ WHERE USER_ID=:B3 AND SECURITY_GROUP_ID = :B2 AND PREFERENCE_NAME = 'PERSISTENT_ITEM_'||:B1

There was indeed a value in WWV_FLOW_PREFERENCES$ for PERSISTENT_ITEM_P1_ITEM. We don't really use preferences except for the usual built in report sorting and this "persistent_item" type of preference is new to me. Even when I deliberately set a preference (apex_util.set_preference), it does not add this prefix.

I can't find anything in the documentation on this. Does anyone know what this might be?

This is on Apex 5.1.2.

This post has been answered by fac586 on Sep 27 2018
Jump to Answer

Comments

fac586
Answer

eaolson1 wrote:

I've just finished debugging a strange problem in a page process that was giving incorrect results because a page item had the wrong value. We discovered this page item value was getting set as soon as the user's session was created and even before he loaded that page. The V() function would return a value for this item even when there was no value in WWV_FLOW_DATA.

Eventually, I turned on session tracing and found this when V('P1_ITEM') was being called:

SELECT ATTRIBUTE_VALUE FROM WWV_FLOW_PREFERENCES$ WHERE USER_ID=:B3 AND SECURITY_GROUP_ID = :B2 AND PREFERENCE_NAME = 'PERSISTENT_ITEM_'||:B1

There was indeed a value in WWV_FLOW_PREFERENCES$ for PERSISTENT_ITEM_P1_ITEM. We don't really use preferences except for the usual built in report sorting and this "persistent_item" type of preference is new to me. Even when I deliberately set a preference (apex_util.set_preference), it does not add this prefix.

I can't find anything in the documentation on this. Does anyone know what this might be?

This is on Apex 5.1.2.

This is how values are persistently stored for page items where the Maintain Session State property is set to Per User.

This may have been set in error as it is an uncommon but occasionally useful feature.

Marked as Answer by Eric Olson 1 · Sep 27 2020
Eric Olson 1

That must have been what happened. It appears in 5.2 if the item is changed back to Per Session, the preferences remain, and the V() function can retrieve the preference rather than the page item value. As far as I can tell, this has been fixed in 18.2, at least in testing on apex.oracle.com.

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 25 2018
Added on Sep 27 2018
2 comments
458 views