Hello,
for a task I need to create a flexible number of apex_items. For this I am using the APEX_ITEM API. Currently I can define the number of Items to be shown. Unfortunately, I didn't find a way to add or delete items one by one.
Furthermore, one of my items is being shown as a button link, where the user should have the option to click on it with a confirmation message to open a new web application. I can create the buttons, but not the functionality.
What I tried was following:
SELECT LEVEL AS item_no,
APEX_ITEM.TEXT(p_idx => 1, p_attributes => NULL) as Criteria, // shown as link button
APEX_ITEM.TEXT(p_idx => 2, p_attributes => NULL) as CriteriaOK, // shown as link button
APEX_ITEM.TEXT(p_idx => 3, p_attributes => NULL) as CriteriaNotOK,
APEX_ITEM.SELECT_LIST(4, null, '1;1,2;2,3;3,4;4') as frequency,
APEX_ITEM.DATE_POPUP2(p_idx => 5, p_attributes => 'DD.MM.YYYY') as date,
APEX_ITEM.text(p_idx => 6, p_attributes => NULL) as time
from dual
connect by level <= to_number(:P12_NUMBER_ITEMS); // Example with number 4
Now I want to have a two buttons or something similar to add or delete rows on each level.
For the CriteriaOK and CriteriaNotOk items I changed the type of the columns to link and changed the link properties to (Example CriteriaOK)
Link: javascript:void(null);
Link text: <span class="t-Icon fa fa-check" aria-hidden="true"></span>
Link attributes: data-id="#CriteriaOK#" class="add t-Button t-Button--success t-Button--simple t-Button--stretch"
Then I created a dynamic action to open the second tab when a button is pressed, but it doesn't fire since the link url is declared as javascript:void(null). Since the user has to confirm the action I can't put the web url from the application to the link attribute of the column. Also the links get unchecked when i press another link button.
Finally, I need to display the entries of the apex_items after the save process in the same way.
Any idea on how to solve this problems?
Thanks. Any help is appreciated.