lundi 1 novembre 2021

Oracle Apex Checkboxes doexn't update with Dynamic Actions

I'm using Apex 19.1 on an 18.c database. I have a page with three page items and three corresponding Dynamic Actions (DA's). When either P273_START_DATE or P273_END_DATE are changed, their dynamic actions perform as expected. They refresh a chart region. I also have a third page item - P273_WEEKDAY_SELECTOR. The DA associated with it is the problem. The page item has the following characteristics:

Identification / Type = checkbox.
List of Values / Type = Static Values
List of Values / Static Values = Mon, Tue, Wed, Thu, Fri
Source / Used = Only when current value in session state is null
Source / Maintain Session State = Per Session (Disk)

The page item P273_WEEKDAY_SELECTOR is contained in the region From / To Date Selection along with the two date fields.
The Chart region, Weekday Attendance has the following notable characteristic

Source / Page Items to Submit = P273_WEEKDAY_SELECTOR

The Dynamic Action has the following Characteristics

Identification / Name = P273_WEEKDAY_SELECTOR_CHANGE
When / Event = Change
When / Selection Type = Item(s)
When / Items = P273_WEEKDAY_SELECTOR

True Action #1

Identification / Action = Execute PL/SQL Code
Settings / PL/SQL Code = null;
Settings / Items to Submit = P273_WEEKDAY_SELECTOR
Settings / Items to Return = P273_WEEKDAY_SELECTOR
Settings / Suppress Change Event = No
Execution Options / Event = P273_WEEKDAY_SELECTOR_CHANGE

True Action #2

Identification / Action = Refresh
Affected Elements / Selection Type = Region
Affected Elements / Region = Weekday Attendance
Execution Options / Event = P273_WEEKDAY_SELECTOR_CHANGE 

In trying to solve this problem, I created a temporary region TEST_REGION with a page item P273_WEEKDAY_TEST. I added a temporary True Action #3 to update TEST_REGION. The page item P273_WEEKDAY_TEST has the following characteristics:

Source / Type = SQL Query (return colon separated value)
Source / SQL Query = Select '''' || regexp_replace(:P273_weekday_selector, ':', ''', ''' ) || '''' from dual;

When I change the selected checkboxes the page item P273_WEEKDAY_TEST doesn't get updated with the DA for the checkbox. However, if I press the browser's refresh button, the item P273_WEEKDAY_TEST gets updated with the proper values e.g. 'Mon', 'Tue', 'Fri'

This setup doesn't seem to fire on change of the checkbox, yet the other DA's fire when either date is changed. How do I made a DA work for change of a checkbox item?




Aucun commentaire:

Enregistrer un commentaire