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!

iFrame Submit and Redirect with Version Change/Cannot Submit

detnarpSep 28 2017 — edited Sep 28 2017

I have a parent page that display navigation buttons over an Iframe that displays 1 of 5 child pages. When a user clicks a navigational button, I need the child page in the iframe to submit, and then redirect to a new page that corresponds with the navigational button.

I am attempting to recreate a form in apex that the users currently use in Oracle Forms.

pastedImage_8.png

I have attempted this with two ideas (both failed):

When a navigational button is pressed

1. dynamic action sets value of P13_PAGE_NO to contain the new page number 2. i have a dynamic action that processes the following Javascript Code: document.getElementById("iframe_id").contentWindow.apex.submit('APPLY') 3. When child page in Iframe is submitted, I setup a branch to another page identified by item. And set this item to read from parent Item :P13_PAGE_NO.

RESULT: when changing data or not, and attempting to switch pages, I get an error stating that the current version of the data is different then the application version of the data. (Current version of data in database has changed since user initiated update process. current row version identifier):

pastedImage_11.png

pastedImage_14.png

I cannot figure out why this happens. I have validated all of the aliases match the column names and getting the source names of all items. If I refresh the page, all the data will show up again and it is fine, until I navigate to a new page. Fields are cleared out with the "different version" error again.

So, at a loss after reviewing the log, I then removed the redirect from step 3, and created a new dynamic action on the parent page to refresh the iframe with the new page number (:P13_PAGE_NO):

page = document.getElementById("P13_PAGE_NO").value if (page) { url="f?p=103:"+ page +":" +$v('pInstance') +"::::" document.getElementById("iframe_id").src=url }; 

When I navigate the page with this sequence, the iframe updates to the new page just fine, but the last page was not submitted.

Through the console, if I manually enter the submit java script to submit the child page, and then manually run the iframe refresh, it works fine. Is there a way to wait for the submit action to complete until I refresh the iframe?

I am not sure if I can/need to address the versioning issue to get this to work, OR if I should pursue figuring out to delay the submit process via javascript and then refresh the iframe. Can anyone by chance offer any ideas or opinions?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2017
Added on Sep 28 2017
0 comments
416 views