Forum Stats

  • 3,872,115 Users
  • 2,266,381 Discussions
  • 7,911,051 Comments

Discussions

How to add, edit and delete column of CR dynamically using javascript

Soukaina IDRISSI
Soukaina IDRISSI Member Posts: 896 Bronze Badge

Hi Experts,

I'm using APEX21.2, and I have 2 pages.

[PG1]: Contain the region EMP DEPT IT BY GROUP Dyn CR [With Params], which represents the list of employee groups in the IT department. This is a CR with :

Source > Type : Function Body returning SQL Query

Appearance > Template : Value Attribute Pairs - Column

The expected points are:

When i click on button (1); The [PG2] is opened, the ACTION item is set to 'U' (to say that it corresponds to a Update), and when i check one of specific row in [PG2], i get and return the Employee Name selected > close modal dialog > change the old value of Employee Name : 'SOUKAINA IDRISSI' (in this example) by the new selected one in [PG2]

When i click on button (2): Remove this Employee Name (this column in reality) and refresh the region

When i click on button (3): The [PG2] is opened, the ACTION item is set to 'C' (to say that it corresponds to a Create), and when i check one of specific row in [PG2], i get and return the Employee Name selected > close modal dialog add this new Employee with select and delete button.

All these changes are not stored in the table unless the button (4) is clicked, they will be stored temporarily in a collection.

When i click on button (4): A confirmation message will be displayed to say if you are sure you want to save these changes?

If the answer is 'Yes' we will update all these modifications to the table GROUPING_DPT_EMP, otherwise do nothing.

[PG2]: Is modal Dialog page with IR of list of Employees

You can see demo, on apex.oracle.com with this credentials:

Workspace: ws_initiation

Username: demo

Password: azerty1234

I used the Application 111591 - Custom Region/ Page 1.

Tagged: