Session state consistency - how does APEX keep session state across pages

I would like to know how the APEX develper tool keeps session state from being overwritten across mutiltple pages in the same Session. Because this is difficult to explain I'll use an example from withing the APEX dev tool
For Example:
1. I navigate to the page (4150) thet allows me to edit my Page 880 [Window 1]
2. I now do a Cntrl^N to Open a New Window in the same session (this opens on the same Page 880 in the new window) [Window 2].
3. In Window 1, I click an item to update ie I want to put a comment on the Unconditional Branch so click this to go to the Update page. I see the F4000_P4313_ID is passed in the URL (ie the context, UID of the Branch).
4. In Window 2, I change the page to 881 - ie this is overwriting my Session State variables for page 880 with page 881.
5. I click an item in Page 881 to update ie I want to put a comment on the Unconditional Branch so click this to go to the Update page. I see the F4000_P4313_ID is passed in the URL (ie the context, teh UID of the Branch).
6. In Window 1 (the Page 880), I add a comment to the Branch and 'Apply' changes. On returning to the Page the context has changed from 880 to 881 (as expected as Window 2 had overwritten the session state). Slightly confusing for the user as they did go from Page 880 not 881 but ok
What intrigues me is how the Edit Branch page applied the update to the correct branch [good !]. Why weren't the Branch Session state variables (ie the Branch for Page 880) overwritten with the Branch Session state variables for the Branch from Page 881 ?
Both navigations go to the same Page passing the UID of the branch, hence I would of thought the last navigation is the one that would be persisting (ie from Page 881 Window) ?
Any tips on preventing users updating the wrong record because of the Session State being overwritten would be most welcome.
Look forward to hearing from you.

Let me take a shot at explaining this.
Session state is stored in Oracle database tables. When a APEX page is rendered, those tables are read and the HTML is sent to the browser. When that page is submitted, all the HTML form inputs on the page are saved back into session state over-writing any existing values for that session
So, in your example, since Page 4313 has the hidden page item (the "GUID" of the branch), it doesn't matter if any other window has the same page open with some other GUID. Each page is a self-contained "unit" which has all the information necessary to properly process that page when it is submitted.
Think of it this way...in your example, when you have windows 1 and 2 open (window 2 was opened after window 1), go back to Window 1 and click the browser's Reload/Refresh button. Instead of refreshing the same page (branch 9000000), you will find that it will load branch 8000000! This is because session state is read from the database and when Window 2 was rendered, it has set F4000_P4313_ID in session state to 8000000.
Hope this helps.

Similar Messages

  • How does APEX create and save new files. What extension does it save in?

    Hi can someone help me with this question?
    How does APEX create and save new files. What extension does it save in?
    Cheers!
    VJ

    It's really too bad we can't see VJ's face when the concept sinks in. This is one of my favorite moments when teaching APEX classes. Most people love it, some people don't. If nothing else it really proves the power and performance of the Oracle database. Each page view can generate 40+ queries, yet on the average system this takes less than .04 seconds.
    Keep in mind there are no undocumented features or "Oracle Internals" that the APEX team uses to achieve this performance, just sound database design. With every feature they add they evaluate how it will be used and design the tables and indexes to most efficiently answer the query. Sometimes this means going against "purist" normalized principals.

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • How does apex detect the MIMETYPE of an upload?

    Hello,
    I need to import a bunch of files from the OS filesystem to my own table (blob).
    For implementing the download of these files I need to know the mimetype.
    Now, the files are stored in my table, but I have no clue how to detect the mimetype of
    my files (blob).
    How does Apex detect the mimetype of an uploaded file?
    Thanks,
    Michael
    Edited by: MJaro on 21.09.2010 15:52, Reason: little typo

    Michael,
    Mimetype detection is done during upload, if you don't have a mimetype column in your table where APEX can store it, this information is lost.
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • How does DIAdem keep track of which version is active when multiple versions are installed?

    I need a way to find out which version of DIAdem is active, without creating an automation reference. How does DIAdem keep track of this? I don't think it's through the registry as far as I can tell. Thanks.

    Hi,
    I'm not quite sure what you mean by "version of DIAdem is active". If you are trying to reference DIAdem from an external program, you will need to use an automation reference. Besides this case, I am not sure what you are referring to.
    Perhaps a short description of your application or intended use will help me point you in the right direction.
    Allen P.
    National Instruments

  • How does one keep the photo description attached to a photo in iphoto when that photo copies to a disc or flash drive

    how does one keep the photo description attached to a photo in iphoto when that photo copies to a disc or flash drive?
    the metadata transfers ok, it is the description of that photo that does not transfer.

    Use the File -> Export command and note the settings to write the metadata to the file on export.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • How does one keep the Creative Cloud purchase/signup popup from popping up everytime I flash up Dream Weaver CS6?

    How does one keep the Creative Cloud purchase/signup popup from popping up every time I flash up Dream Weaver CS6?

    Johnnyontherocks it is likely you installed an updated version of the Adobe Application Manager.  Remove all copies of Adobe Creative software from the computer and reinstall to downgrade the installation.

  • How does oracle know which AO Framework page or process to execute.

    Hi,
    How does oracle know which AO Framework page or process to execute. I use to think this was defined in the Function definition. But looking through some Function definition in HRMS setup I noticed some of them simply calling the same first page, such as the one below used in many managers menus. This initial page is the page that allows managers to choose the employee they want to work on.
    OA.jsp?akRegionCode=HR_PERSON_TREE_TOP_SS&akRegionApplicationId=800.
    My question is, after executing this initial page, how does Oracle then varies the OA page by the diffferent functions?

    Hi;
    Thanks for sharing
    Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding*
    Regard
    Helios

  • How do you keep aggr permanent across reboots on Sol 10?

    How can I keep my aggr permanent across the reboot?? The steps in the manual don't work for my system. It is the 1/06 build and the latest patch cluster has been added. (Kernel 118833-36)
    I created an aggr with bge1 and bge2 and enabled LACP on the NICs
    #dladm show-link
    bge0 type:non-vlan mtu:1500 device:bge0
    bge1 type:non-vlan mtu:1500 device:bge1
    bge2 type:non-vlan mtu:1500 device:bge2
    bge3 type:non-vlan mtu:1500 device:bge3
    #dladm create-aggr -d bge1 -d bge2 -l active 1
    #dladm show-aggr
    key: 1 (0x0001) policy: L4 address: 0:3:ba:f8:13:aa (auto)
    device address speed duplex link state
    bge1 0:3:ba:f8:13:aa 0 Mbps unknown down standby
    bge2 0:3:ba:f8:13:ab 0 Mbps unknown down standby
    #ifconfig aggr1 plumb 192.168.30.110 up
    #ifconfig �a
    lo0
    bge0: flags=1000843<UP, BROADCAST, RUNNING, MULTICAST, IPv4> mtu 1500 index 2
    inet 192.168.30.253 netmask ffffff00 broadcast 192.168.30.255
    ether 0:3:ba:f8:13:a9
    aggr1: flags=1000843<UP, BROADCAST, RUNNING, MULTICAST, IPv4> mtu 1500 index 3
    inet 192.168.30.110 netmask ffffff00 broadcast 192.168.30.255
    ether 0:3:ba:f8:13:aa
    #vi /etc/hostname.aggr1
    192.168.30.110
    I rebooted and I am getting a �aggr1 failed to plumb�
    I tried to
    #ifconfig aggr1 plumb 192.168.30.110 up
    and get �ifconfig: plumb aggr1: Invalid argument
    I tried
    #dladm show-aggr
    and get nothing returned
    I tried
    #dladm create-aggr �d bge1 �d bge2 1
    and get �dladm: create operation failed: File exists�
    So I have to do a
    #dladm delete-aggr 1
    so I can create a new one and start the whole process over again.

    Thanks to smorris@
    bug 6369648 (link aggregation interfaces missing after reboot).
    This has been resolved in patch 120990-02 (SunOS 5.10: net-physical
    Patch)
    I applied the patch and put the aggregate address in the file, /etc/hostname.aggr1 and it remained across reboots.

  • How does I resize a pdf file page using Acrobat Pro?

    In Acrobat Pro, how can one resize a pdf file page (21.38'' x 26.75'') into one measuring 6'' x 9'', to be submitted as the trim size? Is there a feature that allows this to be done? How does one set all print options from the Application print dialog box to enable one to adjust the dimensions of any customized file page?

    I want to scale the 21.4'' by 26.8'' content down to one that can be fitted inside a 6'' by 9'' book.
    I have this pdf that was created from the InkFlow app, and I'm using Acrobat Pro to merge three files into one (about 300MB), which I needed to submit to Amazon's CreateSpace, but they needed the trim size of 6'' by 9'', while the pdf is 21.4''' by 26.8'', and I can't amend the source file size of the InkFlow files.
    I tried fiddling with the Crop and Print options, but I'm unable to resize the pdf to match the trim size. The problem on my side isn't so much on printing but to resize the pdf file page to 6'' by 9'' to satisfy Amazon's requirement for their trim size. Could this be done with Acrobat Pro? The message that appears is: Full print options of Acrobat Pro, set all print options from the Application print dialog box. Thank for the help.

  • Corrupt log file, but how does db keep working?

    We recently had a fairly devastating outage involving a hard drive failure, but are a little mystified about the mechanics of what went on with berkeleydb which I hope someone here can clear up.
    A hard drive running a production instance failed because of a disk error, and we had to do a hard reboot to get the system to come back up and right itself (we are running RedHat Enterprise). We actually had three production environments running on that machine, and two came back just fine, but in one, we would get this during recovery:
    BDBStorage> Running recovery.
    BerkeleyDB> : Log file corrupt at LSN: [4906][8294478]
    BerkeleyDB> : PANIC: Invalid argument
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__os_stack+0x20) [0x2c23af2380]
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__os_abort+0x15) [0x2c23aee9c9]
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_panic+0xef) [0x2c23a796f9]
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_attach_regions+0x788) [0x2c23aae82c]
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_open+0x130) [0x2c23aad1e7]
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(__env_open_pp+0x2e7) [0x2c23aad0af]
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so [0x2c23949dc7]
    BerkeleyDB> : /usr/local/BerkeleyDB.4.8/lib/libdb_java-4.8.so(Java_com_sleepycat_db_internal_db_1javaJNI_DbEnv_1open+0xbc) [0x2c239526ea]
    BerkeleyDB> : [0x2a99596e77]
    We thought, well, perhaps this is related to the disk error, it corrupted a log file and then died. Luckily (or so we thought) we diligently do backups twice a day, and keep a week's worth around. These are made using the standard backup procedure described in the developer's guide, and whenever we've had to restore them, they have been just fine (we've been using our basic setup for something like 9 years now). However, as we retrieved backup after backup, going back three or four days, they all had similar errors, always starting with [4096]. Then we noticed an odd log file, numbered with 4096, which sat around in our logs directory ever since it was created. Eventually we found a good backup, but the customer lost several days' worth of work.
    My question here is, how could a log file be corrupted for days and days but not be noticed, say during a checkpoint (which we run every minute or so)? Doesn't a checkpoint itself basically scan the logs, and shouldn't that have hit the corrupt part not long after it was written? The system was running without incident, getting fairly heavy use, so it really mystifies me as to how that issue could be sitting around for days and days like that.
    For now all we can promise the customer is that we will automatically restore every backup as soon as it's made, and if something like this happens, we immediately try a graceful shutdown, and if that doesn't come back up, we automatically go back to the 12-hour-old backup. And perhaps we should be doing that anyway, but still, I would like to understand what happened here. Any ideas?

    Please note, I don't want to make it sound like I'm somehow blaming berkeleydb for the outage-- we realize in hindsight there were better things to do than go back to an old backup, but the customer wanted an immediate answer, even if it was suboptimal. I just feel like I am missing something major about how the system works.

  • How does APEX import a packaged APEX application

    I was wondering, if someone might help me to better understand how APEX imports a packaged application.
    The typical packaged application file looks like a simple SQL*Plus Script that needs to be processed by SQL*Plus from PL/SQL on the server.
    I would be most interested to understand how APEX handling this process because it might really help me (and probably many others) to improving our own installation process.
    Thank you in advance for any information!

    The documentation contains an entire chapter on Deploying an Application. This appears to be a good place to start.
    The tutorial How to Review a Packaged Application would also be worthwhile.
    (Please update your forum profile with a better handle than "user8607986".)

  • How does Apex access and manage db objects in other schemas?

    I'm looking for a description of how Apex accesses and manages database objects in other schemas.
    I'm sure I've seen such a description somewhere earlier but am unable to find it again...

    Hi Rene,
    When you are connected to sqlworkshop, it is basically connected to the sceham owner of the workspace. If you execute the query
    select sys_context( 'userenv', 'current_schema' ), user,  username from user_users;you would see the schema and user(currently connected) and schema owner through which you have logged in. The user will have all the privileges granted to schema owner. So basically you get connected through APEX_PUBLIC_USER and it has all the privileges of the schema owner.
    In order to run scripts in another schema you would need grants on other schema same like you are connected to user A through sqlplus and wants to create objects in schema B. For example lets say you want to create a table in schema B and you have create table privileges in scehma B , you can execute command create table B.emp as select * from A.emp;
    I hope this answers your question.
    Regards,
    Manish

  • Where and how does iPhoto keep photos?

    I am in the process of scanning and editing about 1000 old Kodakchrome slides taken over the past 40+ years.
    My scans go into Photoshop Elements for tarting up and then are stored in various folders with appropriate names. After that I import them into iPhoto 5 in order to assemble them into albums, slides shows or whatever.
    Questions: 1. Does iPhoto actually import and keep a copy of each image file? 2. Can I safely delete the folders I have used for the original and processed scans? 3. If I back-up the iPhotolibraries to an external hard drive, I am safe - I won't lose my pictures?
    I am sure that these basic questions have been answered by various Mac gurus a zillion times before but I found it pretty daunting to read through the 20+ pages shown in discussions. One has to admit the contents of the iPhoto folders and files is all pretty mysterious!
    Any help or direction will be most gratefully received.
    David Amies

    Hi David,
    A little more info for you...
    --First thing to know and remember is this...Do not drag any images, folder of images into the iPhoto Library in the Finder. Images have to be imported into iPhoto within the application. Do not scan images and save them into the iPhoto Library folder in the Finder. Save them to another location such as the Pictures folder or even the desktop. You can then import them into iPhoto.
    --You have a folder of images on your hard drive and want to import them into iPhoto. Drag the folder of images into an open iPhoto Library window and the folder of photos will be copied into the library, resulting in a new roll with the name of the folder. You now have two copies of those photos, the ones in iPhoto's database and the ones on your desktop. You can keep the ones on your desktop that you just imported as backup or you can delete that folder.
    -- you scan a picture/pictures and save it in a folder. You cannot scan directly into iPhoto or the iPhoto Library folder in the Finder.
    You want all your photos in iPhoto so you import them into iPhoto.
    Now you have two copies of that picture/pictures, so you can delete the originals that were in the scanned folder and keep the one/ones that were imported into iPhoto.
    -- You download pictures from your camera into iPhoto.
    There is now one copy of each of the pictures.
    You want to change something about a picture you imported, such as
    cropping it or changing the size, or changing the orientation.
    Once you do that to a picture, you now have two copies of the picture
    in iPhoto, the original and the edited one. The edited one will be in the library organize view. The original is packed away in an Original folder in your iPhoto Library folder under the date of the roll. You can always revert to the original by control clicking on the photo and choose "revert to orginal" You will not have this choice if you used iPhoto Diet to get rid of the Originals.
    (a quick note on cropping within iPhoto...when you are in edit mode, you automatically will be in the crop mode with cross hairs to highlight the crop area. To finish cropping you must click the crop button and then go back to library view and your cropped picture will be there.
    3.You want to use Photoshop or another graphic program to edit a picture in your iPhoto library.
    You can open up prefs for iPhoto and choose "when double clicking on
    photo ..do" choose "other" and select Photoshop. Now you can edit all
    pictures in your iPhoto library in PhotoShop by double clicking. If you save the photo with the same name and as a flattened file it will be saved right into iPhoto and you will see the changes. If you don't want to save it into iPhoto then do a "save as" and save to the desktop. You will then have the original photo still in iPhoto and your new edited photo on the desktop.
    Or, with iPhoto open, you can drag a picture from the library window
    to your desktop (you see a + sign on the pic you are dragging). You now
    have two of the same picture, one in the iPhoto library and one on your desktop. You can open up the one on your desktop in any graphic program and work on it. The one in iPhoto stays the same. You can also share/export the picture/pictures to your desktop or folder to work on them or do batch processing, etc. You will still have the originals in your iPhoto Library.
    Or, you can open up the ~/Pictures/iPhoto Library/folders and option drag any
    picture out of the folder to your desktop. Notice that you will see a plus sign while dragging the photo. This is copying the file to your desktop
    I would advise anyone not to do this as they might forget to use the option key and drag the photo out. Next time you open iPhoto the photo will be missing.
    Two Apple kbs for you to read
    Don't tamper with files in the iPhoto library folder

  • Static Files with same name. How does apex determine which files to serve?

    Hello, I'm using apex 4.2.1.00.08 and I cannot figure out how apex manages the static files and cannot find any help in the docs (other that some high level UI description).
    The application is serving some file and I cannot find which one it is in any easy way.
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen as
    SELECT *
    FROM wwv_flow_files
    WHERE flow_id = 0;
    and can apparently only be deleted using "SQL Commands" inside apex.
    the URL called is something like
    wwv_flow_file_mgr.get_file?p_security_group_id=13498126233076320&p_fname=myfile.css
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.
    apparently files linked to flow_id 0 have precedence over all the other files ...
    Thanks for clearing up a bit of "fog" on this issue.

    VC wrote:
    Go to that application > shared components > Static files you should see the file.the problem is that there are multiple files with that name, and that sometimes the file being served is linked to application "0" and it doesn't show in the "shared components" interface ...
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.Static files can be uploaded to apex with optionally associating with an application within that workspace.
    Files associated with an application are referenced using *#APP_IMAGES#*
    Files not associated with an application are referenced using *#WORKSPACE_IMAGES#*I referenced with #WORKSPACE_IMAGES#, but now I see that if I use #APP_IMAGES# the URL generated will also contain the application ID. This would help to discriminate between different files with the same name but linked to different applications ...
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen asWhy are you particularly interested in application 0?Because somehow APEX puts the files that I uploaded there ... they can be seen selecting from wwv_flow_files. Do they take precedence over all other files with the same name?
    Filename is unique for the given workspace[and application]I disagree. I have multiple files with the same name ... the root of this problem ...
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.How is your static file referenced??
    But not always, try associating an static file with and application and reference it using #APP_IMAGES# instead of #WORKSPACE_IMAGES#
    See
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm#BEIDCGAJ
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ui_file_manage.htm#HTMDB06011
    Thanks, but the documentation doesn't give much details ... apparently files referenced with #WORKSPACE_IMAGES# can still resolve to files linked to specific applications ... I would like to understand the actual workflow for the various cases (file references with APP_IMAGES, referenced with WORKSPACE_IMAGES, file associated with the application, with another application, with no application, with application "0" ...).
    Also, I find it somewhat misleading that you can have files associate with applications that don't exist anymore (e.g. have been deleted).
    Edited by: GChierico on Apr 11, 2013 2:16 PM

Maybe you are looking for

  • Creating graph and DFS in a graph

    Hello all, I have set of vertices in array and edges in linked list. Now i want to create a graph and do depth first search. Can anyone suggest me how to proceed. situ

  • Sort Order change as you wish

    Dear, If you could provide a query in which sort order is change i.e (name begin with a letter C first then D then B then A and then E, F, G, .... Z?

  • Retrieve parameters from LDAP using authentication module

    I have existing LDAP that contains organization people and their attributes. I have several web applications that use existing LDAP for authentication and authorization. My goal is to deploy single sign-on with openSSO so that users are authenticated

  • Issues with Nested AM Transaction

    Hi All, I am using JDev  11.1.1.6 and WLS 10.3.6 I am developing an application that contains a number of AMs(Application Module) . Now I clubbed  all the AMs under a root AM.by modifying  the databindings.cpx and all the necessary pagedefs. Now I ne

  • How to Return From Call to Stored Procedure

    I created an SQL Query Report portlet which contains a Delete link next to each record. If the user clicks on the link, it calls a JavaScript function which confirms the Delete and then calls a stored procedure which deletes the record. After the rec