/Users/lyon/j4p/src/net/server/servlets/SelectSectionPage.java

1    package net.server.servlets; 
2     
3     
4    /** 
5     * The SelectSectionPage class is a type of HTML page 
6     * which is used to prompt a user to select the section id 
7     * for a previously selected course id. 
8     * 
9     * @author Robert Lysik 
10    * @version 1.00 
11    */ 
12   class SelectSectionPage extends net.server.servlets.HtmlPage { 
13    
14       /** 
15        * This is the default constructor for the 
16        * SelectSectionPage class. The parent constructor 
17        * is caller with the page title, 'Section Selection Page'. 
18        * A form is added to the page which is used to prompt 
19        * the user to select a section id for the course which 
20        * they had selected during a prvious step. 
21        */ 
22       SelectSectionPage(String courseId, String[] sectionIds) { 
23           super("Section Selection Page"); 
24    
25           addText("Select a section ID for course " + 
26                   courseId + 
27                   " from the following list:"); 
28           startForm("get", 
29                   "http://localhost:8080/examples/servlet/FormProcessorServlet"); 
30           addBreak(); 
31           addText(getSelect("section", "1", sectionIds, sectionIds)); 
32           addBreak(); 
33           addSubmit("Enter"); 
34           addHidden("course", courseId); 
35           addHidden("status", "section_id_selected"); 
36           endForm(); 
37       } 
38   }