this is supposed to be simple
i have two pages A and B what i want to do is add a button (a hyperlink or image will do) in page A that when clicked go to page B
how can i do that ?
thanks
If you don't want a button, simply use a html href to f?p=&APP_ID.:<your page number to link to>:&SESSION.
Go to page 2! takes you to your page number 2...
There are many ways. Perhaps the simplest is to create an Apex button using the Create Button wizard. Follow the instructions and when you get to the "Action When Clicked" page, choose "Redirect to Page in this Application" as the Action and enter the Page number you want to go to when the button is clicked. You can also enter other details such as Request, Clear Cache, Set These Items.
Related
I have a function that returns a value (e.g.27).
I am put this value to my page item (P2120_SYMPTOM_ID) and i want with this value to open with button another page (P2140).
I am going to button Link builder - target and i am using P2120_SYMPTOM_ID like this:
but unfortunatendly this value doesn't pass to my new page criteria.
How can i use this value?
If you're just navigating to another page (as opposed to opening a modal window) then use action "Submit" on your button and create a branch to the new page. That is how navigation is supposed to be done. The link builder links are generated when the page is rendered and do not pick up session values.
This is a common question, and relates to the fact the link uses values during page render, not what may have happened during interaction with the page
A common solution is presented in the Oracle forums here
https://community.oracle.com/tech/developers/discussion/3725149/pass-client-side-state-to-modal-dialog
Alternatively, there is a free & supported FOEX Redirect plugin that also solves this problem
https://fos.world/ords/f?p=10000:1080
I have a value of a field on page 1 that I need to pass to page 2 (modal dialog).
The field is changed on page 1. and I can see it's got updated on the page and when I print its value in debug messages.
When I'm clicking the button, with the action "Redirect to Page in application", the value on page 2 is the initial value of the field, and not the updated one, is this a bug?
what can I do?
I don't want to use dynamic action or things like "prepare_url" because of many reasons.
Thanks.
That is not how a link works. What you are seeing is not a bug, it is expected behaviour. The link is rendered when the page is rendered and will have the item values at render time and a calculated checksum (depends on settings) based on those values. It will not pick up any changes.
The "traditional" way to do this is the following. Assumptions: Need to navigate from page 1 to page 2 and set P2_ITEM on page 2 to value of P1_ITEM on page 1.
Create button (let's say button name is MYBUTTON) of type "Submit Page"
Under "Processing", create a branch to page 2.
For "Page or URL" pick page 2 and set P2_ITEM to value P1_ITEM.
For "Process point" pick "After Submit"
Under "Server Side Condition", select "MYBUTTON" under "When Button Pressed".
Since this is a branch your page has been submitted and all the changes you made to P1_ITEM will be picked up. The fact that page 2 is modal does not affect this, APEX will take care of that for you.
As an alternative to Koen Lostries excellent explanation, in some cases it is also possible to have the target page load the item from the source page.
Ensure that the item is being pushed to the session, for example by using a dynamic action with the items to submit option, but do nothing else in this dynamic action.
Then, when page 2 opens, simply add a pre-header-process, that makes something like :P2_ITEM := :P1_ITEM;
In my experience this approach is easier than doing a redirect in a dynamic action, as there is no declarative option for that and you often need hand-written javascript to do that.
I have a wizard and i am trying to pass a value from one page to the next onclick a next button on the wizard in oracle apex but when i click next the value is not going through to the other side.
enter image description here
Image above shows the next button and the how i am trying to pass the value
thanks
What you did is this:
there's page 33
there are (at least) two items on that page
P33_ID
P33_NEW
you are passing P33_NEW item's value into P33_ID item
in other words, you're doing it on the same page, while it seems - according to what you said ("I am trying to pass a value from one page to the next") - that you're expecting something to happen on some other page
If that's so, transfer P33_NEW item value to "some other page", not page 33.
If you still want to do it on the same page, consider using a Set value dynamic action.
I have two form pages 3 and 4. I want to pass the value for item: P3_LOT_N in page 3 to item: P4_LOT_N in page 4 when the button "Next" is pressed. How can I do this in oracle apex 5.0? Please help. Thank you.
Here's how:
open NEXT button's properties
under "Behavior", set "Action" property to "Redirect to page in this application"
click the button next to the "Target" (currently, it says "No link defined")
in a modal window that opens, target page will be Page 4
in "Set items" section, set "Name - value" pair (i.e. set P4_LOT_N to accept P3_LOT_N value)
That should be all.
If you do this via a "Redirect to page in this application", then the other form values you have on page 3 will not be POSTed to session state.
There are at least a couple other ways you could accomplish this:
You could simply have the Source of item P4_LOT_N be P3_LOT_N.
You could define a computation on page 3, to set P4_LOT_N to P3_LOT_N.
I want to maintain the Scroll Position between two pages. I have a Page A which has many reports, when user clicks a report, user will be redirected to Page B where the report will be opened to make the changes. After submitting changes, user will be redirected to Page A. Here the problem is, showing the top of the page but I want to show the page at the previous position.
I have tried using this.MaintainScrollPositionOnPostBack = true; but this is working only on the same page but not between the different pages.
I really need to fix this, please give me your thoughts...
The simplest thing to do is probably give every link/report on page A an anchor.
So, for each report you would hide an id attribute somewhere - say the title, so it would be something like <h3 id="report42">Report 42</h3>. Then when you go back from page B, instead of going to www.example.com/pageA.html, you go to www.example.com/pageA.html#report42. This will open the page with the scrollbar at wherever the report42 id is found.