This content has been marked as final. Show 7 replies
Thank You so much. But Still Doesn't work :(
You're right. I can use $x.Value("#name",value); .
The Jquery $().val(); and $x.Value(,); both seem to work as I can see from the console log output - But I cant figure out why the value of the page item is not reflected in list of page item values in the session(can see on clicking session button on apex bar) . If I use the page item to pass value to next page, it sends "" (blank) only.
I tried dynamic actions like "Set Value" before page submit. still doesn't work.
You're right. I can use $x.Value("#name",value);
Please check the syntax of the function in the reference link given in above post.
Also you can use:
The following threads indicate that you to have set item value using AJAX to reflect it in session state:
Also the following function can help:
Hope it helps!
Thanks for following up. Really appreciate it.
Jquery is not the problem. Something to do with session state. Btw, P2_NAME is a hidden page item(I don't think that matters).
I checked firebug console and the firebug HTML. It works just fine.
1. I can see in the HTML/Source:
2. But in the "Session" - It's blank!
<input id="P2_NAME" type="hidden" value="shiva" name="p_t01"
Source Value used : Always, replacing any existing value in session state
Source Type used : Static Assignment (value equals Source Attribute)
3. When I refer to this item as &P2_NAME. in my url - It sends blank too.
There is also a function in APEX_UTIL package that will help to set session state of
a Page Item or Application Item :
But you have to write a PL/SQL process to set the session state:
BEGIN APEX_UTIL.SET_SESSION_STATE('my_item','myvalue'); END;
If without submitting the page then: Advanced Dynamic Action of type Execute PL/SQL Code executing above code block
Hope it helps!
Hope this is useful for people with similar problem :
It was a very simple solution which missed my attention - To set values to application items on a
page (Before going to next page or refreshing same page) (without ajax),
we need to use a SUBMIT request (either using apex branch or using apex f?p url syntax) (you may assert any name for the request).
Thanks Kiran for your support. I learnt there are many ways to insert values to application items from your feedback.