Refresh only one region instead of the whole page in oracle apex - oracle-apex

I have made a region containing 2 display only items and a button.
The button performs some dynamic action (execute pl/sql query) and the page is refreshed every time the button is pressed (submit page action) .
Is there any way that on click of the button only that particular region gets refreshed instead of the whole page?
Also for the display only items, lets say
item_label ==> item_display_value
how to add this (==>) symbol in between?

If the page is submitted, then it will refresh completely - that is how apex works. But if a submit is not needed, you can add an action of "refresh" to the dynamic action and remove the submit. Make sure the "Behaviour > Action" property of the button is set to "Defined by dynamic action".
Note that not all region types support refresh, but all report types do.

Related

How can I refresh and show/hide buttons in Buttons Container in Modal Dialog in Oracle APEX based on an Item Value?

In Oracle APEX 22.1 (Oracle Database EE 21c) I have a Modal Dialog Box which has a button container with several buttons. These buttons are being shown or not, based on a item in dialog box variable that is 0 or 1.
When I press the button "UnDelete", a Dynamic Action of PL/SQL execution type is fired, change the value of a field in the database and then two another Refresh True Actions follow. The PL/SQL execution type changes the value of the field in the database of a table successfully and the first dynamic Action refreshes a Classic Report Region on the Modal Dialog Box showing the new correct value of the field.
The second Refresh True Action tries to Refresh the Button Container Region of the Modal Dialog Box in order to hide the button "UnDelete" and show the rest buttons, which all are Server Condition based on this variable value. The Refresh does not take place(maybe the Button Container Region does not support the Refresh Event or does not propagate it to its Buttons)?
How can I achieve this effect?
Thanks In Advance!
I tried the Refresh Action for the Button Container Region of the Modal Dialog Box,but the buttons are not shown/hide accordingly.
"Refresh" is not relevant for a button container. The "refresh" action in apex does an ajax call to refresh the content of a report - it just re-renders a part of the DOM containing data. Currently only the data rendered by a component can be refreshed using partial page refresh. A button can never "refreshed", it is rendered in the page rendering process and from then on it lives in the DOM for the lifespan of the page.
A server side condition is evaluated at page rendering time. If a server side condition yields false at page rendering time, the component is not included in the dom. So, they cannot be shown using a dynamic action afterwards (because they're not in the dom) and they cannot be re-evaluated using a dynamic action (because the dynamic action can only manipulate the dom and that condition was evaluated before the dom was rendered).
The solution to you problem is to use show/hide actions in a dynamic action for each of the individual buttons for the reasons explained above.

Interactive filters set on page load only show up after manual refresh

I am setting up dynamic filters for the IG using new APEX_IG package method add_filter. So from Page 1 I click oin the link to go to Page 2 where I have interactive grid. Through that link I set a couple of page items on page 2 and based on those items I create filters using APEX_IG.ADD_FILTER. So the setting of the filters has to be done on PAGE_LOAD.
On page load I use a DA that calls APEX_IG.ADD_FILTER if a specific page item is not null. When I open the page first time, I do not see the filters applied, they only show up after I manually refresh the page. I added a refresh action for the IG after executing ADD_FILTER but that does not do anything - in order to see the change I still have to manually refresh the page.
I cannot add any refresh action or submit page action under page load since that will refresh the page repeatedly. What is the best way to programmatically refresh the page after applying or removing the filters?
If the issue is just on page load, you could add the call to APEX_IG.ADD_FILTER in a pre-rendering page process instead of a dynamic action. This works fine for me. This blog also explains that a full page refresh is needed.

Apex Oracle : How to refresh Page Item?

I have a page Item on Apex 19.2
In page validation where i'm setting the value of the item : P1_MyItem. The value is set properly in session state. However it's not reflected immedialy in the html item. I still need to reload the page to get the right value in the item.
Is there any way to reflect it immediatly please ? (without reloading the page)
Thanks.
Cheers,
You need to ensure Items to Return lists any item that is updated within the PL/SQL, that you would also like updated within the web page once the dynamic action is completed.
As opposed to 'Items to Submit', which sends any information in pages items the browser is aware of to the database, before execution of the PL/SQL block.
Page processing now defaults to using Ajax. So, if a validation error occurs, the page is no longer re-rendered by default because the assumption is that validations will not change session state. If you want to see your changes, you'll need to locate the page property named Reload on Submit and set that to Always.
But, of course, that means the page will be re-rendered/re-loaded which is what you're trying to avoid.
Also, it's not possible to set the page property to Reload on Submit if you want to use an Interactive Grid on the same page. It requires the option Only for Success, so you have to refresh the page item somehow else.

Oracle APEX form on table, don't reset table pagination after changing values through the form

I have a form on top of a report, and when the user updates values in the report, the form pops up, they make edits, and then click "Apply Changes". There are many rows in the report and right now I have pagination set per every 15 pages. The report is set to enable partial refreshes so the data updates right after the user clicks "Apply Changes". However, if I am on any page other than the first page of the report, it resets the pagination and brings me back to the first page. Is there a way to update the report but stay on the page I'm making the edit for? That way the user can immediately see the change they made through the form.
I was able to solve the issue by using a Dialog Closed dynamic action executing the following javascript:
window.location.reload(false);
It refreshes the browser after the user makes edits, and the pagination does not reset. This is a workaround because the Refresh dynamic action resets pagination. Again this is in APEX 5.1.3.
Which Apex version do you use? I've just tried it on apex.oracle.com which runs Apex 20 and - no problem at all. Once I edit some value in a form, branch returns me to interactive report, to exactly the same page which I left.
Check branch's Behavior - it is set to redirect to page or URL, target is page where the interactive report is; check other properties for the target. Its action should be set to "None" (offered are: clear regions, reset regions, reset pagination which might be set in your branch properties).

Retool: Action button to open modal with container

I have a table in retool. I've added an "action" column with buttons and renamed them "edit". What I would like to do on click of the action button is to open a modal with the data in the row populated. A user should be able to see the values of the row, edit them and when he clicks "submit" it will send an update API call for that row's unique id.
We’re working on some new docs for modal components, but until then here’s what you can do:
Drag a modal component onto your canvas. It’s going to appear as a button that opens a model, but don’t worry about that just yet
Create a Javascript query in the query editor that opens the modal. If we’re working with the default names, your query would be modal1.open()
Configure the action button in your table to run that JS query on click
That’s a quick way to open a modal through an action button. In terms of what’s in that modal, you can drag any components you want and reference table properties. So if you wanted to display a user’s email, you could drag a text component into the model and set its value to table1.selectedRow.data.email.
The last thing to deal with is the button, which you probably don’t want since you’re opening the modal via action buttons. You can hide it by clicking on it, heading to the inspector in the right sidebar, and scrolling down to the “display” settings. Just put true into the “Hide when true” field and the button won’t show.
hello stack overflow family this is my first post.
we are facing same issue today so i used one trick for opening a modal in action, i run one query that query name is model_open and in success event i select modal open and this query is triggered in Action edit option ,
i hope my first post help you ... :)