Even though Projects and Tasks are stored in two separate tables, it is useful to display their information on one page. A Master-Detail form enables you to do just that. To add a Master-Detail form, perform the following steps:
| 0. Click Create Page. ![clip_image002 clip_image002](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiLCX9GLLSnYd3IlBd8cePYGXK_8zN-PsMU6HMR-dchZ6HPfBHwVQasR61lVyFVP1B3QRhv3g-zKT7Pya4Qi7L_WM72lnMWxQcyjSISxURx9_AtEAYvyzEYfDJ5tR4_t-6JLYkXpphCEx4/?imgmax=800) |
| 1. Select the Form page type and click Next . ![clip_image004 clip_image004](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCFgcIQE_Y-wkKJhnlL_RUf1R3kvF4stlzVpIc9v4CKbrBm3A4ioFqBl3HYhGrNSqQxj7Bpk5jnMk9H6HiQHrPXUYKBIkOtF0jhyd63wIWTw7hyphenhyphend5rsn4D2i8pfeL0r1xlxcYY4wPGw3yl/?imgmax=800) |
| 2. Select Master Detail Form and click Next >. ![clip_image006 clip_image006](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL9QhoBiUDrIdvf95RsiSoF0NnVZsPYDxuVHqyebauy74DXbyl7VJh_CuZz7Z-XzHmwrXr_ErNI-gXPbAFBl8vr50BBtLsYlD9Y8gEe4oTrZ2FaEaRAXmmmyc_Z8n4k_BURX5ZYEX3vY7o/?imgmax=800) |
| 3. You first select the Master table. Select APEX_PROJECT_LOOKUP for the Table/View Name and click the Select All ( ) icon to move all the columns to the Displayed Columns area. Then click Next >. ![clip_image010 clip_image010](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNPUCxEghUSbMd7Vvx0dTc0Ou7Jgls3lgnQ6WVdSj-jhGY2RTbE64WGZhHMjWYeYDChRDPn6ndNEPq7vNyXTn1DtaQzgwDObYUNi_Sp2RRjOd0N56AzuDlMeyMZ6fvWjl54ipYz30HzQpB/?imgmax=800) |
| 4. Next, you select the Detail table. Select APEX_TASKS for the Table / View Name and click the Select All ( ) icon to move all the columns to the Displayed Columns area. Then click Next >. ![clip_image012 clip_image012](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaD1gIvBtkYbepOejiiSWNXuU2J6zG4EJPwnHP06wXR8FeNoYcKKn20qq6mBombCUV6cPfm2NPp_4XtiHlr_VC0m9z0uPEomvek2hG1M9yi6dzp-9L_XTtZVlDUkFQLZ3L9oRQXN02hyIb/?imgmax=800) |
| 5. When the table APEX_PROJECT_LOOKUP was created, a trigger was also created to invoke the sequence when a row is inserted. Accept the default to use an Existing Trigger and click Next >. ![clip_image014 clip_image014](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLuCsxcHskcAj0MKUjmFDAs-mLKIY92IxrYGeq_J-0oQdRJl2u9lUncBACA3eD8584F4inii3-lgii6Wid0etbAD-OI8wHyOl6OOEDAypY7dgnrvjt27O1l-PkyztaaiU-OGyDdLbSrz8t/?imgmax=800) |
| 6. Click Next > to use the Existing Trigger on the APEX_TASKS. ![clip_image016 clip_image016](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYdW_Pgw2TOIRcJLPddxzDajfMOsRAK60KtnDke5-xSZTz-D-DCqQmLbqWG1lTvkvXnKwqv1TLuUwgB35MhFH593v7czVCBHAABXhDXGJHuUJQzwXr6Y5VmfyhgQBNKQy68tVNKM9URNi9/?imgmax=800) |
| 7. For Include master row navigation, select Yes. This selection allows a user to scroll through projects on the Master-Detail page. For Master Row Navigation Order, select PROJECT. This selection makes the next project displayed, the next one alphabetically by project name. If you chose PROJECT_ID, the next record would be calculated by PROJECT_ID and that would be confusing to the user. For Include master report, select Yes. This section creates a page, in addition to the master/detail, that is a report of all projects. The report also contains navigation to the Master-Detail page. When done making your selections, click Next >. ![clip_image018 clip_image018](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlcZO_8aiiN7IPQT6VyivRfSOyVKCBxsATXJU_7LtjhfCvvsl7tBCA5X1KNK9ktTsuXhZhMdjMtbX8xDUCf4xX8tx4xS_qHFSwz7ZlCFtJ2ccfZrbiCAz-rg7hiWyuJl2wEvRlKBSz1KpF/?imgmax=800) |
| 8. Make sure Edit detail as tabular form on same page is selected and click Next >. By selecting to edit detail as a tabular form on the same page, the tasks report on the Master-Detail page is editable. If you selected edit detail on a separate page, the tasks report would just be a report and editing would be per record on a separate page. ![clip_image020 clip_image020](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_O2qDeHHI6tuckSOoWTynHl6KapX3voSWQuNlARfXp4tjt-jduarH5ruQJbTLDyaJmob5kbY8D5UCEu-iioKwiWjHCUsI6-E4_gHZ7OPyTgifw1VeF04UW2AZ5dTnp7R1t58W6RdYs-tl/?imgmax=800) |
| 9. Under the Create Breadcrumb Entry section, change the Entry Name (Master Report) to Projects and Entry Name (Master Detail Page) to Projects and Tasks. Then click the Home link to set the parent breadcrumb of the new Projects report to Home. This selection makes it navigatable from the Home page. ![clip_image022 clip_image022](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeJG0dZGYS4foaHCnsDHv9Qzmt8jMdLr5XwfneVhMO7hL2Dh2_JdiasqUmQ_0kVxEX0-kIFg89ESP_QJgH4kiT0iQBLRWsWmqLbco1YSWcdao0Zh3lF6HcxFCJpOyflcAwYodfSPXv34_S/?imgmax=800) |
| 10. Click Next . |
| 11. Accept the defaults of Do not use tabs and click Next > . ![clip_image024 clip_image024](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOCUf3oLvYWsnAVIqTkIBZJWoYpCsQUJKFMdj-1vSToRqv0XSma3cYgvb-ZklTbIKrrnntW5Mnc_FRI_IYcDrRu7aJLHqxJrvNmiHELrzo9JO4cK5UNU70jWBxg1q4q5kzJuWkfnmeSKRx/?imgmax=800) |
| 12. Click Create to create the Master Detail Form. ![clip_image026 clip_image026](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMMKd70gJMhmZu4mYipsfBF5joXjynqdxIVB2_Eg5aM2sMtPQO2rMyKud0jalTQlGZAQBPgd0BRGWz-9x8LY11bFwcKahcOI4aR8xnskvkFDKyeMz3gamgQL1AtURIkZYwYGGLI2nX37u5/?imgmax=800) |
| 13. Click the Run Page icon. ![clip_image028 clip_image028](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUNS7TYUoEtBHSxpmFRIrKUCfUvMQDIWYP5QNeol9ENjb7rD-_BsBBKs0dt09oDd2I4RuNLpptBYdXCgpec8rYrDrHiWRtrikxzmHd2Z3W4uIWj2wlpvs7O6ppjRgtaCxJKie06ttO0JDR/?imgmax=800) 14. Enter the login information if it is requested. ![clip_image030 clip_image030](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoRyNd7X1AGsywZ4lDXXuUm4Ph4qHx-2QkaK6prt5UUNBT2fWwjbfZ0Cp-yQMD5WfzcrReceurp3RYLpGwAIGciEzMu1glAyeFaIorSYUr9BIFX1CHpjIu5nLXJ4MHm8iZ6gGH478Ez_CP/?imgmax=800) |
| 15. A report containing the list of projects is automatically created. Select the Edit ( )icon next to one of the projects to view the Master detail Form. ![clip_image034 clip_image034](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIQnkROaNjA8PiO6f0CLSJauUiMFE0LMSzXeNs_x3GxKhSL_7db7MzelwlKSGpF2-wkk6y8lTmFjfW19kCi4Tolb1n4m9t7EU9XuIy1PQSq98XXlv4pR8PNJY95eMEKQaDMnQiLFYxV84O/?imgmax=800) |
| 16. The Master Detail Form is shown. This page allows a user to edit the details of the Project as well as the details of the Tasks associated with the Project. It also allows users to add new tasks to the current project. In the detail region, you see an Add Row button. This button saves any pending changes and then adds another row so that a new task can be added to the project. You should also have a Delete button. This button is used in conjunction with the check boxes to the left of each Task. The check box in the header row is used to select all of the tasks displayed on the page. When you click the Delete button, any tasks that have been "checked" are deleted. If you use this feature, you notice that a deletion confirmation has been built in. This asks you to confirm your deletion before proceeding. In addition, you see a Previous and Cancel button for each area on the form. The upper set of buttons correspond to the Project Information and the lower set of buttons correspond to the Tasks. The Previous button appears because you selected to include Master row navigation. The Cancel button returns the user to the Projects report. Change the name of the project and click Apply Changes. ![clip_image036 clip_image036](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcWASE35tRS39NPhcE0pzyWYZXZ_hwSiTClWwtMbq0z4G_sGzUu9Ph8zpEitBC56nt53B_z3WfRrqwhXdJ7oQazMezlIRnPH1tWPmADcsM74V8CRp4kk7jYf-Wix1VSxE4HHDzw3-mRNed/?imgmax=800) |
| 17. Your changes were made. Click the Application <n>link in the developer toolbar. ![clip_image038 clip_image038](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirwN8rxOxABboean2kO878xIi4-V4NERTOyGOloKsc_BxWYusG8DjzOWxwGV23Vw6cXLYjEF5VcB7mscwK2w2c11bd4_fnZLK_8wE3Vlx5SHeD3cM-C1xyIdQ0wVEYFk3qgjee7EyIBVzY/?imgmax=800) |
No comments:
Post a Comment