3 Replies Latest reply: Nov 23, 2012 10:38 AM by Tyson Jouglet RSS

    flow.accept mixing up items when saving session

    Tyson Jouglet
      Application Express 4.0.2.00.07
      Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production

      When submitting the page the form values are being mapped to the wrong items when saving session state.

      Here is the html looks like immediately before the form is posted:
      <input type="hidden" name="p_arg_names" value="233046132271210983">
      <input type="hidden" id="P111_REMOVE_FILE_ID" name="p_t28" value="">
      
      <input type="hidden" name="p_arg_names" value="233041727152210969">
      <select name="p_t18" id="P111_ENTITY_ID" size="1" class="selectlist">
        <option value="">-- select one --</option>
        <option value="5050312"  selected="selected">P1</option>
      </select>
      Here is what is in the headers:
      ...
      ------WebKitFormBoundarymxredIIJuwDWsAUR
      Content-Disposition: form-data; name="p_arg_names"
      
      233046313709210983
      ------WebKitFormBoundarymxredIIJuwDWsAUR
      Content-Disposition: form-data; name="p_t28"
      
      ...
      
      ------WebKitFormBoundarymxredIIJuwDWsAUR
      Content-Disposition: form-data; name="p_arg_names"
      
      233041727152210969
      ------WebKitFormBoundarymxredIIJuwDWsAUR
      Content-Disposition: form-data; name="p_t18"
      
      5050312
      ...
      here is what ends up in session state:
      select item_name, item_value
        from apex_040000.wwv_flow_data
       where 1=1
         and item_id = 233046132271210983 -- remove_file_id
         and flow_instance = 4073153388492821; -- my session
      
      
      ITEM_NAME            ITEM_VALUE                                                                     
      -------------------- ------------
      P111_REMOVE_FILE_ID  5050312
      
      select item_name, item_value
        from apex_040000.wwv_flow_data
       where 1=1
         and item_id = 233041727152210969-- entity_id
         and flow_instance = 4073153388492821; -- my session  
      
      ITEM_NAME      ITEM_VALUE                                                                     
      -------------- ------------
      P111_ENTITY_ID (null)     
      here is the debug:
      0.02585     0.00114     A C C E P T: Request="ATTACH_FILE"     
      0.02694     0.00134     Metadata: Fetch application definition and shortcuts     
      0.02827     0.00191     NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us     
      0.03018     0.00083     alter session set nls_language="AMERICAN"
      0.03101     0.00017     alter session set nls_territory="AMERICA"     
      0.03117     0.00030     NLS: CSV charset=WE8MSWIN1252     
      0.03148     0.00016     ...NLS: Set Decimal separator="."     
      0.03163     0.00025     ...NLS: Set NLS Group separator=","     
      0.03188     0.00023     ...NLS: Set g_nls_date_format="DD-MON-RR"     
      0.03211     0.00022     ...NLS: Set g_nls_timestamp_format="DD-MON-RR HH.MI.SSXFF AM"
      0.03233     0.00128     ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR"     
      0.03362     0.00022     ...Setting session time_zone to -07:00     
      0.03383     0.00172     ...metadata, fetch translated app info     
      0.03555     0.00029     ...fetch session state from database     
      0.03583     0.00091     fetch items     
      0.03674     0.00108     ...fetched 132 session state items     
      0.03784     0.00021     ...Check session 4073153388492821 owner     
      0.03804     0.00032     ...Check for session expiration:     
      0.03836     0.00017     ...Metadata: Fetch Page, Computation, Process, and Branch     
      0.03852     0.00026     Session: Fetch session header information     
      0.03879     0.00323     ...metadata, fetch page info     
      0.04203     0.00110     ...Validate item page affinity.     
      0.04312     0.00015     ...Validate hidden_protected items.     
      0.04327     0.00019     ...Check authorization security schemes     
      0.04346     0.00063     Session State: Save form items and p_arg_values
      ...
      0.06194     0.00041     ...Session State: Save "P111_REMOVE_FILE_ID" - saving same value: "5050312"     
      ...
      0.06901     0.00027     ...Session State: Saved Item "P111_ENTITY_ID" New Value=""     
      ...
      0.07501     0.01150     Processing point: On Submit Before Computation     
      0.08655     0.00212     ...Process "Set WM Context - OnSubmit": 
      0.08862     0.00065     ...Process "Set Previous Page Id": PLSQL (ON_SUBMIT_BEFORE_COMPUTATION) :F200_PREVIOUS_PAGE_ID := :APP_PAGE_ID;     
      0.08927     0.00017     Branch point: Before Computation     
      0.08943     0.00015     Computation point: After Submit     
      0.08958     0.00029     Tabs: Perform Branching for Tab Requests     
      0.08988     0.00019     Branch point: Before Validation     
      0.09006     0.00074     Validations:     
      0.09080     0.00881     Perform basic and predefined validations:     
      0.09962     0.00055     Perform custom validations:     
      0.10016     0.00017     ...Validation "P111_CATEGORY" - Item Not Null Validation: P111_CATEGORY     
      0.10033     0.00025     ...Validation did NOT pass     
      0.10058     0.00017     ...Validation "P111_SUB_CATEGORY" - Item Not Null Validation: P111_SUB_CATEGORY     
      0.10075     0.00022     ...Validation did NOT pass     
      0.10097     0.00016     ...Validation "P111_FILE" - Item Not Null Validation: P111_FILE     
      0.10113     0.00018     ...Validation did NOT pass     
      0.10130     0.00048     ...Inline validation error count = 3     
      0.10178     0.00025     Show current page with inline validations
      The page gets caught by validations because items I entered were mapped incorrectly to session state. There are no processes in the shared components or the page that runs before the validations that alters any values. can anyone shed some light on what is going on here and what might be happening?

      Any help with this would be much appreciated.

      Thanks,
      Tyson