简体   繁体   中英

pop up a form on button click in ADF

I am new to ADF and I have 2 views as pics below:

在此处输入图像描述

部门视图

部门详情查看

  • DepartmentsView : which display all departments names, total salary and total No. of employees and have a view button that directs to DepartmentDetailsView.
  • DepartmentDetailsView : which display department name, total salary and total No. of employees for the chose department and have a button call Add Employee

what i want in DepartmentDetailsView is: when i click on Add Employee button, a pop up form rendered for entering employee data with save button which will update count and total salary without refreshing and hide the employee form after save. how can i do this in ADF?

You add an <af:popup> to the DepartmentsDetailPage. The popup holds the form to add a new employee. When you click the save button in the dialog, you update the view that shows the department details via a PPR (Partial Page Request).

You can add the PPR to the form declaratively by adding the save button to the PartialTRiggers property of the form.

Your use case misses some points. When you open the popup the first time, you can create a new row in the employee's iterator. However, you did not mention how to create a new employee once the popup is open.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM