Tuto WEBDEV 25
184 Part 5: Let’s continue the development 3. To build our page, we are going to switch all code lines corresponding to parameters into comments: • Select the "MySource ..." code lines. • Press Ctrl + / on the numeric keypad. 4. Close the code editor (click the cross in the top right corner of editor). We are now going to create in our page the different controls allowing the user to select the query parameters. These controls will be positioned above the Table control. ▶ Move (if necessary) the Table control in the page and reduce its height in order to leave space for creating the different controls for criteria selection. First parameter: Customer name In order for the user to be able to type a customer name to find, we are going to create an edit control. ▶ To create the edit control: 1. Display the "Analysis" pane if necessary: on the "Home" pane, in the "Environment" group, expand "Panes" and select "Analysis". The different data files described in the "Full_WEBDEV_ Site" analysis are displayed in the pane. 2. Click the icon on the left of the "Customer" data file: the items found in the data file are listed. 3. Select the "FullName" item located in the Customer data file, then drag it and drop it in the "PAGE_Multicriteria_search" page. 4. The edit control is automatically created. Position this control above the Table control. ▶ We are now going to pass the value typed in the edit control in parameter to the query: 1. Select the Table control and press the F2 key. 2. In the "Initializing" event of the Table control, replace the line: //MySource.ParamCustomerName = <Value of ParamCustomerName> by: MySource.ParamCustomerName = EDT_FullName In this code, EDT_FullName is the name of edit control that was just created. The value of this control is associated with the ParamCustomerName parameter expected by the query. 3. Close the code editor.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==