跳转到主要内容

单击提交则表示您同意developerWorks 的条款和条件。 查看条款和条件.

当您初次登录到 developerWorks 时,将会为您创建一份概要信息。您在 developerWorks 概要信息中选择公开的信息将公开显示给其他人,但您可以随时修改这些信息的显示状态。您的姓名(除非选择隐藏)和昵称将和您在 developerWorks 发布的内容一同显示。

所有提交的信息确保安全。

  • 关闭 [x]

当您初次登录到 developerWorks 时,将会为您创建一份概要信息,您需要指定一个昵称。您的昵称将和您在 developerWorks 发布的内容显示在一起。

昵称长度在 3 至 31 个字符之间。 您的昵称在 developerWorks 社区中必须是唯一的,并且出于隐私保护的原因,不能是您的电子邮件地址。

单击提交则表示您同意developerWorks 的条款和条件。 查看条款和条件.

所有提交的信息确保安全。

  • 关闭 [x]

Lotus Domino 和 IBM WebSphere 集成解决方案: Domino JSP 标签库

Form JSP code

Return to article

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>

Return to article