WebSheets UI - PowerPoint PPT Presentation

1 / 3
About This Presentation
Title:

WebSheets UI

Description:

WebSheets UI Servlet Parameters SQL Statements ResultSet Figure 2. An input form page (Page1) and a result page (Page2) during development. WebDev allows a user to ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 4
Provided by: DavidW323
Learn more at: https://www.cs.usfca.edu
Category:

less

Transcript and Presenter's Notes

Title: WebSheets UI


1
WebSheets UI
2
WebSheets Internal Architecture
3
Sample Generated Servlet
If(actionTag.equals(remove)) // Access
request parameters String minStock
req.getParameter(MinStock) // Access DOM tree
created from HTML templ BookListDOM doc new
BookListDOM()   // Execute specified delete
operations using JDBC and // SQL Delete
statements stmt.execute( "delete from BOOKS where
INSTOCKlt" minStock) // Execute the specified
Select statement to obtain a resultset. rs
stmt.executeQuery( "select BOOKS.ISBN,
BOOKS.NAME, BOOKS.PRICE, BOOKS.INSTOCK from BOOKS
where INSTOCKgt10 and PRICEgt22") // Use DOM
manipulation code to while(rs.next()) // Use
DOM manipulation code to enter these values in
the DOM tree. doc.setText_table1_col0(rs.getStrin
g(1)) doc.setText_table1_col1(rs.getString(2))
doc.setText_table1_col2(rs.getString(3)) doc.se
tText_table1_col3(rs.getString(4)) // Evaluate
the spreadsheet formulas of the expressions
doc.setText_table1_col4( String.valueOf(rs.getIn
t(3) rs.getInt(4))) // Clone the sample
row tempRow.getParentNode().insertBefore( tempRow
.cloneNode(true), tempRow) // Remove the
sample row tempRow.getParentNode().removeChild(tem
pRow) // Write the updated DOM tree to the
browser out.println(doc.toDocument()) else
if(actionTag.equals(add)) //
Write a Comment
User Comments (0)
About PowerShow.com