Here is the complete code for the form JSP:
<%@ taglib uri="domtags.tld" prefix="domino" %>
<%@page import="lotus.domino.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Vehicle information using Domino Tag Library</title>
</head>
<body>
<h1>Vehicle information using Domino Tag Library for <%= (String) request.getParameter("unid")%></h1>
<domino:document id="doc">
<%
boolean isNew = false;
if(doc.isNewNote()){
isNew = true;
}
%>
<% if(isNew){ %>
Creating a new car document...
<% } else { %>
Modifying an existing car document...
<% } %>
</domino:document>
<domino:form name="carform" schema="car" editmode="edit" validhref="carformthankyou.jsp" clientvalidate="true">
<domino:validatesummary caption="The following error(s) were detected. Please correct them and try again:<br/>" />
<table border="1" width="100%" cellspacing="0" cellpadding="0">
<tr>
<th align="left">VIN</th>
<td>
<domino:input name="vin"/>
<domino:validaterequired name="vin" alert="true"
message="VIN is a required field.">
<--- Error</domino:validaterequired>
</td>
</tr>
<tr>
<th align="left">Make</th>
<td>
<domino:input name="make"/>
<domino:validaterequired name="make" alert="true"
message="Make is a required field.">
<--- Error</domino:validaterequired>
</td>
</tr>
<tr>
<th align="left">Model</th>
<td>
<domino:input name="model"/>
<domino:validaterequired name="model" alert="true"
message="Model is a required field.">
<--- Error</domino:validaterequired>
</td>
</tr>
<tr>
<th align="left">Body Type</th>
<td>
<domino:input name="bodytype"/>
<domino:validaterequired name="bodytype" alert="true"
message="Bodytype is a required field.">
<--- Error</domino:validaterequired>
</td>
</tr>
<tr>
<th align="left">Engine</th>
<td>
<domino:input name="enginetype"/>
<domino:validaterequired name="enginetype" alert="true"
message="Enginetype is a required field.">
<--- Error</domino:validaterequired>
</td>
</tr>
<tr>
<th align="left">Year</th>
<td>
<domino:input name="year"/>
<domino:validaterequired name="year" alert="true"
message="Year is a required field.">
<--- Error</domino:validaterequired>
<domino:validatepattern name="year" pattern="[0-9]{4}"
alert="true" message="Year must be a four-digit numeric value.">
<--- Error</domino:validatepattern>
</td>
</tr>
<tr>
<th align="left">Specifications</th>
<td>
<domino:input name="specifications" multivalue="true"
mveditseparator="comma" mvdisplayseparator="semicolon" />
<domino:validaterequired name="specifications" alert="true"
message="Specifications is a required field.">
<--- Error</domino:validaterequired>
</td>
</tr>
</table>
<domino:saveclosedoc>Save</domino:saveclosedoc>
</domino:form>
</body>
</html>
|