org.experlog.db
Class ESDbFormHandler
java.lang.Object
org.experlog.db.ESDbFormHandler
public class ESDbFormHandler
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ESDbFormHandler
public ESDbFormHandler(OpenClient s)
ESDbFormHandler
public ESDbFormHandler(OpenClient s,
ESServletRequest req)
displayUnresolved
public void displayUnresolved(boolean yes)
- Display unresolved symbols or not.
defineDataSet
public void defineDataSet(java.lang.String name,
DataSet ds)
defineDataObject
public void defineDataObject(java.lang.String name,
DataObject t)
displayDbForm
public void displayDbForm(java.io.PrintWriter out,
java.lang.String template)
throws java.sql.SQLException,
java.io.IOException
- Expand and display a database HTML template.
The SQL query must be present in the template.
- Parameters:
out
- The PrintWriter where the HTML will be displayedtemplate
- The database HTML template to expand.
- Throws:
java.sql.SQLException
java.io.IOException
updateDB
public void updateDB(ESServletRequest req,
java.lang.String tmpl)
throws java.io.IOException,
java.sql.SQLException,
java.lang.Exception
- Execute an update statement in the database, using an update template
and an HTTP request.
Example:
- We need to update a customer's address in the database (example:
UPDATE Customer SET Address='12 Downing Street' WHERE LastName='Smith')
- An incoming HTTP request (from a submitted form) contains values
for the customer's address and last name (let's say "Add" and "Name").
In that case, the template string will be the following:
UPDATE Customer SET Address='$Add$' WHERE LastName='$Name: $'
- Parameters:
req
- An HTTP request that contains parameter valuestmpl
- An SQL update template string.
- Throws:
java.io.IOException
java.sql.SQLException
java.lang.Exception