JSP CUSTOM TAG LIBRARIES


Example: viewitem tag
This code creates a table on the theForm.jsp that a view's entry links to via a formlink tag.

<%@ taglib uri="WEB-INF/lib/domtags.tld" prefix="domino" %>

<html>

<body>

<domino:form name="myForm" schema="Article" dbname="myDatabase.nsf">

<table>

<tr>

<td>Author:<td><domino:item name="Author"/></tr>

<tr>

<td>Title:<td><domino:input name="Title" size="80"/></tr>

<tr>

<td colspan=2><domino:richtext width="100%" name="Body"/></tr>

<tr>

<td colspan=2><domino:editdoc/><domino:savedoc/></tr>

</table>

</domino:form>

</body>

</html>

The following is the code used in a JSP called theView.jsp to make the Title view entry hot link to the Title column of the table on the theForm.jsp.

<%@ taglib uri="WEB-INF/lib/domtags.tld" prefix="domino" %>

<html>

<body>

<domino:view dbname="myDatabase.nsf" viewname="All">

<table border=1>

<tr><th>Title<th>Date<th>Author</tr>

<domino:viewloop>

<tr>

<td><domino:formlink href="theForm.jsp">

<domino:viewitem name="Title"/>

</domino:formlink>

<td><domino:viewitem name="LastAccessed" format="date=short"/>

<td><domino:viewitem name="Author"/>

</tr>

</domino:viewloop>

</table>

</domino:view>

</body>

</html>

See Also