1. Summary of the Customer Management System
(1). the MVC design mode is used in general. jsp is used as the view layer, servlet is used as the control layer, service is used as the business layer, Dao data layer, and upper layer is used to call the lower layer.
(2). Except for the welcome. jsp page, users can directly access it. Other page users cannot access it, but are implemented through forwarding.
(3) Remove the underline Of the hyperlink:
<A href = "/summer_exercise15/crmservlet? Method = toaddjsp "style =" text-Decoration: none ">
Add customer information
</A>
(4 ). this contains the use of many El expressions. This requires skillful use and more practice in the future. (Note: Data in El expressions is searched from domain objects, does not default a domain .)
(5) extract the data from the "" database and convert it to 1991,01, 01 using the calendar class,
Java. util. Date (this method is outdated) -------------> convert to Java. util. Calendar
(6) locate the position of the element corresponding to tableid:
Document. getelementbyid ("inputid"). Focus ();
(7) Content Selection:
Document. getelementbyid ("inputid"). Select ();
(8). Get the data in the element of the table label:
// Locate the element corresponding to the tableid, that is, the <Table> label
VaR tableelement = Document. getelementbyid ("tableid ");
VaR size = tableelement. Rows. length; // size = 5
// Array of ID numbers
VaR IDs = "";
For (VAR I = 1; I <= size-3; I ++ ){
// Obtain the checkbox element in the first column of each row
VaR checkboxelement = tableelement. Rows (I). cells (0). firstchild;
// If this check box is selected
If (checkboxelement. Checked ){
// Collect the id value of this check box
IDS + = checkboxelement. Value + "_";
}
}
(9) The paging technology is adopted:
// Calculate all pages
If (this. allrecordno % This. perpageno = 0 ){
This. allpageno = This. allrecordno/This. perpageno;
} Else {
This. allpageno = This. allrecordno/This. perpageno + 1;
}
2. program call structure:
3. Some results:
Project Summary (1)-Customer Management System