开发技术:调查您的应用程序需求
添加时间: 2008-4-26 1:22:32 作者: Oracle指导 阅读次数:13 来源: http://www.d9soft.com
2. For Create List of Values, select From Scratch and click Next.
3. Enter a value for Name, such as response options 1 through 5; select the Dynamic option; and click Next.
4. Enter the SQL query in Listing 2 into the page.
Code Listing 2: List of values query
select 1 display_value, 1 return_value from dual union all
select 2 display_value, 2 return_value from dual union all
select 3 display_value, 3 return_value from dual union all
select 4 display_value, 4 return_value from dual union all
select 5 display_value, 5 return_value from dual
order by display_value
5. Click Create List of Values.
Add answers to the region. Now you need to add the answers to the region.
1. In the Items section of the page 1 definition screen, click the Add icon.
2. Click Create multiple items at the bottom of this screen.
3. In the Create Items in Region list, select the new HTML region: Oracle Application Express Workshop Survey ....
4. Enter eight items named P1_A1 through P1_A8.
5. Change the item Label field to the case-sensitive string &P1_Qn.—where n is the number of the current answer. (Note the period at the end of these values.)
6. For the type of each item, select Radio Group.
7. Click Create Multiple Items.
8. In the Items section of the page 1 definition screen, under Items, for each of the new Radio Group items, click the name—P1_An,—and in the Edit page, in the List of Values section, select the name you gave the list of values you created (such as response options 1 through 5), and enter 5 for Columns.
Add a process. Now add a process to populate the P1_Qn question items with the values of the first eight questions.
1. In the Processes section of the Page Processing section on the page 1 definition screen, click the Add icon.
2. Select PL/SQL, and click Next. 3. Enter a name.
4. For Point, select On Load-Before Header.
5. Click Next.
6. Copy and paste the following into the text box:
for
:P1_Q8 := c1.question; end if; end loop;
and click Next.7. Click Next, and finally click Create Process. Add validation. Now add validation to ensure that everyone who takes the survey answers all of the questions. 1. In the Validations section of the page 1 definition screen, click the Add icon.2. Click Create Multiple, not null validations at the bottom of this screen.3. Select the eight answer items (P1_A1 through P1_A8), and click Create Not Null Validation. Add a Next button. Add a button called Next to the HTML region.
开发技术:调查您的应用程序需求(2) 第 [1] [2] 下一页
上一篇文章: 开发技术:关于变量、移动以及含义 下一篇文章: 解决方案:Oracl数据库中大数据的备份

