This content has been marked as final. Show 4 replies
This has always kind of been a gripe of mine. As for the 2nd question, add requires that you have an application item and you pass that in (it puts your value to that item). addparam was a shortcut built-in a little later that puts your value to the x01 arrays - no need for an application item, so it is preferred.1 person found this helpful
You can reference it like wwv_flow.g_x01...10.
Thanks Sc0tt. That explains some of what's going on.
I am managing to stumble my way through understanding AJAX. Now I have an issue with refreshing the page without submitting it, but that's another subject. I'm finding good info on that already so, maybe I won't need to post anything on that.
Hello Gregory,1 person found this helpful
>> … $x('pFlowId').value … $v('pFlowId')
These two functions yield the same result. $v() was introduced in 3.1 as a shorter syntax to $x(‘pId’).value .
>> get.add() … get.addParam
The first methods – add() – set session state. As such, it needs an APEX item (page or application level) and it has a persistent nature. Even if we had the need to use a temp variable, we still needed to define a “real” APEX item. To save us the trouble of dealing with transient variables, a group of 10 packaged items – g_x01 to g_x10 – were defined. These variables are not saved in session state, and we can set them by using the addParam() method. As they are packaged variables, they only last for the duration of your current AJAX request. As was mentioned by Scott, in your on-demand PL/SQL process, you can reference them by apex_application.g_x01 – apex_application.g_x10 (apex_application is a synonym to the wwv_flow package).
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More
Thanks Arie. It's always good to hear someone else version as it will likely spark another thought or call to mind something one has overlooked. For example, that bit about
makes me wonder if I can apply that to something else I'm having trouble with.
add() - set session state
I'll have to ponder that a bit.