-
Copyrights 2010 - Online Training Oracle Applications. All Rights Reserved.
|
There are five types of canvas To execute an application, one content canvas or one tab canvas should be there. Example of TAB canvas Create a new table EMPFIVE same as standard EMP table. After selecting the type as " Tab" Next Move all columns from available items to displayed items Next Next Select Form Next Frame Title -- Emp DetailsNext Finish As we have selected canvas type as "Tab" , A Tab page is created.
Create another data block based on DEPT table. In the layout wizard , we need to choose the "New Tab page" in existing canvas. Observe, there are two page pages created in the form. In Object Navigator also, we can see two tab pages in the canavs. Change Label of the Tab pages in the properties. Save the form as EMP_DEPT.fmb Using one form, we can work with both the tables. Vertical tool bar canvas Provides standard look and feel. Example of vertical tool bar canvas Create table EMPSIX ( same as standard EMP Table). Create a new form with EMPSIX table ( using Data block wizard and layout wizard ) Go the layout editor and increate the length and breadth of the view ( the black line border ). The block border is called as view. In Object Navigator, create new canvas. In the Object Navigator --> Select the canvas C1--> Go to the layout editor ( Press F2 ) In the Object Navigator under EMPSIX Data block Under Items Create four new buttons. Name the Items as B1, B2, B3 and B4.
All the four buttons will appear in the vertical toolbar as we have mention canvas as C1 in property palette. Provide the following code in WHEN_BUTTON_PRESSED trigger and compile. For button B1 For button B2 For button B3 For button B4 Arrange the button in layout editor of vertical toolbar canvas. In the Object navigator, select the default window ie WINDOW1 Keep the cursor in field Empno, click on Execute Query button, Click on other buttons and check the functionality. Horizontal Toolbar canvas Horizontal toolbar canvas is similar to vertical toolbar canvas. Please try it yourself. Stacked Canvas Stacked canvas is displayed on top of content canvas. Example of stacked canvas Create table EMPLOY in oracle database. create table EMPLOY ( dcode char(1),
Create form based on table EMPLOY using datablock and layout wizard. In Object Navigator, create new canvas. Place wage_type, amount and cperiod in the stacked canvas. Create OK ( Button ) in canvas TEMPCAN ( using Layout Editor ( F2) ) In the property palette of the button, Create WHEN-BUTTON-PRESSED trigger for OK button an provide the following code and compile.
Create SAVE ( Button ) in canvas EMPCAN ( using Layout Editor ( F2) ) In the property palette of the button, Create WHEN-BUTTON-PRESSED trigger for SAVE button an provide the following code and compile. Generation of ECODE automatically based in sequence Create KEY-NEXT-ITEM for DCODE item, and provide the following code and compile
begin Create KEY-NEXT-ITEM for ETYPE item, and provide the following code and compile begin Create WHEN-VALIDATE-ITEM for ETYPE item, begin Create KEY-NEXT-ITEM for COMM item and provide the following code and compile. In the property palette of the ADDRESS item Generating ECODE using existing ECODE through select stmt declare Save the form as EMPLOY_STACK.fmb Provide the following details and observe the functionality Also, check the functionality of all the triggers. Assignment Account No Name Create stacked canvas for Account type S Create stacked canvas for Account type C
Create Data Block based on the above table and distribute columns in different canvases.
|