You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2001/11/10 13:05:17 UTC
cvs commit: jakarta-struts/contrib/artimus/pages/wizard Form.jsp Relay.jsp Result.jsp View.jsp
husted 01/11/10 04:05:16
Added: contrib/artimus/pages/article Form.jsp Menu.jsp Result.jsp
View.jsp
contrib/artimus/pages/wizard Form.jsp Relay.jsp Result.jsp
View.jsp
Log:
Add "artimus" sample application to contrib folder.
Revision Changes Path
1.1 jakarta-struts/contrib/artimus/pages/article/Form.jsp
Index: Form.jsp
===================================================================
<%--
/**
* Data entry page.
*
* @author Ted Husted
* @version $Revision: 1.1 $ $Date: 2001/11/10 12:05:16 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<head>
<html:base/>
<link rel="stylesheet" type="text/css" href="../../styles/global.css" />
<title>Articles - Article Entry Form</title>
</head>
<body>
<table class="parent">
<tr>
<td>
<table class="child">
<tr>
<td colspan="3">
<html:errors/>
</td>
</tr>
<html:form action="/admin/Store">
<tr>
<td align="right" nowrap>Title:</td>
<td align="left" colspan="2">
<html:text property="title" size="50"
maxlength="255" accesskey="T"/>
</td>
</tr>
<tr>
<td align="right" nowrap>Author:</td>
<td align="left">
<html:text property="creator" size="30"
maxlength="75" accesskey="A"/>
</td>
<td align="left">
Full name of person who orginated the article.
</td>
</tr>
<tr>
<td align="right" nowrap>Article:</td>
<td align="left" colspan="2">
<!-- The Struts html:textarea tag does not support wrapping -->
<!-- so we use this trick instead -->
<textarea name="content" rows="12" cols="50"
accesskey="a" tabindex="2" wrap="soft">
<bean:write name="articleForm" property="content"/>
</textarea>
</td>
</tr>
<tr>
<td align="right" nowrap>Contributed:</td>
<td align="left">
<html:text property="contributedText" size="30"
maxlength="75" accesskey="A"/>
</td>
<td align="left">
</td>
</tr>
<tr>
<td align="right" nowrap>Contributor:</td>
<td align="left">
<html:text property="contributor" size="30"
maxlength="75" accesskey="A"/>
</td>
<td align="left">
</td>
</tr> <td align="right" nowrap>Article ID:</td>
<logic:notPresent name="articleForm" property="article">
<td align="left"><i>
<html:hidden property="article"/>
not assigned
</i></td>
</logic:notPresent>
<logic:present name="articleForm" property="article">
<td align="left">
<html:hidden property="article"/>
<bean:write name="articleForm" property="article"/>
</td>
</logic:present>
<td> </td>
</tr>
<tr>
<td colspan="3" align="right">
<html:submit accesskey="S">
SAVE
</html:submit>
<html:cancel accesskey="C">
CANCEL
</html:cancel>
</td>
</tr>
<html:hidden property="key"/>
</html:form>
</table>
</td>
</tr>
<tr>
<td class="options">
<html:link forward="done" accesskey="D">
DONE
</html:link>
</td>
</tr>
</table>
</body>
</html:html>
1.1 jakarta-struts/contrib/artimus/pages/article/Menu.jsp
Index: Menu.jsp
===================================================================
<%--
/**
* Menu page.
* @author Ted Husted
* @version $Revision: 1.1 $ $Date: 2001/11/10 12:05:16 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/request" prefix="req" %>
<html:html>
<head>
<html:base/>
<link rel="stylesheet" type="text/css" href="../../styles/global.css" />
<title>Admin - Menu</title>
</head>
<body>
<table class="parent">
<tr>
<td align="center">
<table class="child">
<tr>
<td colspan="3">
<html:errors/>
</td>
</tr>
<html:form action="/search/Hours">
<tr>
<td align="right">Posted in the last:</td>
<td align="left">
<input type="radio" name="key" value="24">Day<br>
<input type="radio" name="key" value="168">Week<br>
<input type="radio" name="key" value="720">Month
</td>
<td align="left">
<html:submit property="submit" value=" FIND "/>
</td>
</tr>
</html:form>
<html:form action="/search/Title">
<tr>
<td align="right">Article Title:</td>
<td align="left">
<input type="text" name="key" size="16"
maxlength="45">
</td>
<td align="left">
<html:submit property="submit" value=" FIND "/>
</td>
</tr>
</html:form>
<html:form action="/search/Author">
<tr>
<td align="right">Article Author:</td>
<td align="left">
<input type="text" name="key" size="16"
maxlength="45">
</td>
<td align="left">
<html:submit property="submit" value=" FIND "/>
</td>
</tr>
</html:form>
<html:form action="/search/Content">
<tr>
<td align="right">Article Text:</td>
<td align="left">
<input type="content" name="key" size="16"
maxlength="45">
</td>
<td align="left">
<html:submit property="submit" value=" FIND "/>
</td>
</tr>
</html:form>
<html:form action="/View">
<tr>
<td align="right">Article ID:</td>
<td align="left">
<input type="text" name="key" size="5" maxlength="10">
</td>
<td align="left">
<html:submit property="submit" value=" VIEW "/>
</td>
</tr>
</html:form>
<html:form action="/search/Last" method="get">
<tr>
<td align="right"> </td>
<td align="left">
<input type="hidden" name="key" value="20">
<html:submit property="submit" value=" LATEST NEWS "/>
</td>
<td align="left"></td>
</tr>
</html:form>
<req:isUserInRole role="contributor">
<tr>
<td colspan="3">
<hr>
</td>
</tr>
<tr>
<td> </td>
<td>
<html:form action="/admin/Input">
<html:submit>ADD ARTICLE</html:submit>
</html:form>
</td>
<td> </td>
</tr>
</req:isUserInRole>
<req:isUserInRole role="manager">
<tr>
<td> </td>
<td>
<table border="1" cellpadding="8" width="100%">
<tr>
<td>
<html:link forward="createTables">
CREATE TABLES
</html:link></br>
<html:link forward="createIndex">
CREATE INDEX
</html:link></br>
<html:link forward="reload">
RELOAD CONFIG
</html:link>
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
</req:isUserInRole>
</table>
</td>
</tr>
<tr>
<td class="options">
<html:link forward="logon">LOGON</html:link> |
<html:link forward="exit">EXIT</html:link>
</td>
</tr>
</table>
</table>
</body>
</html:html>
1.1 jakarta-struts/contrib/artimus/pages/article/Result.jsp
Index: Result.jsp
===================================================================
<%--
/**
* List of articles that match query.
*
* @author Ted Husted
* @version $Revision: 1.1 $ $Date: 2001/11/10 12:05:16 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<head>
<html:base/>
<link rel="stylesheet" type="text/css" href="../../styles/global.css" />
<title>Articles - Article List</title>
</head>
<body>
<table class="parent">
<tr>
<td align="center">
<table class="child">
<tr>
<td align="center" colspan="3">
<bean:write name="RESULT" property="size"/>
matches for
<bean:write name="RESULT" property="description"/>
</td>
</tr>
<logic:notEqual name="RESULT" property="size" value="0">
<tr bgcolor="FFFFEE">
<th>
<span style="text-transform: uppercase">id</span>
</th>
<th>
<span style="text-transform: uppercase">article</span>
</th>
<th>
<span style="text-transform: uppercase">contributed</span>
</th>
</tr>
<tr>
<% int i = 0; %>
<logic:iterate name="RESULT" property="iterator" id="row">
<% i++;
if ( i % 2 == 0) { %>
<tr bgcolor="#EEEEEE">
<% } else { %>
<tr bgcolor="#FFFFFF">
<% } %>
<td align="left">
<bean:write name="row" property="article"/>
</td>
<td align="left" width="100%">
<html:link forward="article" paramName="row"
paramProperty="key" paramId="key">
<bean:write name="row" property="title"/>
</html:link>
</td>
<td align="left" nowrap>
<bean:write name="row" property="contributed"/>
</td>
</tr>
</logic:iterate>
</tr>
</logic:notEqual>
</table>
</td>
</tr>
<tr>
<td class="options">
<html:link forward="done">DONE</html:link>
</td>
</tr>
</table>
</body>
</html:html>
1.1 jakarta-struts/contrib/artimus/pages/article/View.jsp
Index: View.jsp
===================================================================
<%--
/**
* Display complete article (read-only).
*
* @author Ted Husted
* @version $Revision: 1.1 $ $Date: 2001/11/10 12:05:16 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/request" prefix="req" %>
<html:html>
<head>
<html:base/>
<link rel="stylesheet" type="text/css" href="../../styles/global.css" />
<title>Artimus - Article</title>
</head>
<body>
<table class="parent">
<tr>
<td>
<table class="child">
<tr>
<td colspan="3">
<html:errors/>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<h2>
<bean:write name="articleForm" property="title"/>
</h2>
</td>
</tr>
<tr>
<td colspan="3" class="author">
by <bean:write name="articleForm" property="creator"/>
</td>
</tr>
<tr>
<td colspan="3">
<bean:write name="articleForm" property="content"
filter="false"/>
</td>
</tr>
<req:isUserInRole role="contributor">
<tr>
<td colspan="3">
<hr />
</td>
</tr>
<tr>
<html:form action="/admin/Delete">
<td align="left">
<html:submit>DELETE</html:submit>
</td>
<html:hidden property="key"/>
</html:form>
<html:form action="/admin/Edit">
<td colspan="2" align="right">
<html:submit>EDIT</html:submit>
<html:cancel>CANCEL</html:cancel>
</td>
<html:hidden property="key"/>
</html:form>
</tr>
</req:isUserInRole>
</table>
</td>
</tr>
<tr>
<td class="options">
<html:link forward="done">DONE</html:link>
</td>
</tr>
</table>
</body>
</html:html>
1.1 jakarta-struts/contrib/artimus/pages/wizard/Form.jsp
Index: Form.jsp
===================================================================
<%--
/**
* Form to enter data.
*
* @author Ted Husted
* @version $Revision: 1.1 $ $dateString: 2001/09/25 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<html:html/>
<head>
<title>Form - String</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<html:base/>
</head>
<body bgcolor=#FFFFFF link="#000066" vlink="#660066" alink="#33CCCC"
onload="document.forms[0].elements[0].focus();">
<table width="600" align="center" border="1"><tr><td align="center"><table cellspacing="4">
<tr><td colspan="3">
<html:errors/>
</td></tr>
<html:form action="/wizard/Store">
<tr>
<td align="right" nowrap>ID:</td>
<td align="left"> <html:text property="id" size="4" maxlength="4" onblur="this.form.dateString.focus();"/></td>
<td> <font size="-1">1-9999</font></td>
</tr>
<tr>
<td align="right" nowrap>Date:</td>
<td align="left"> <html:text property="dateString" size="10" maxlength="10"/></td>
<td align="left"> <font size="-1">12/12/12</font></td>
</tr>
<tr>
<td align="right" nowrap>Amount:</td>
<td align="left">$<html:text property="amount" size="9" maxlength="9"/></td>
<td> <font size="-1">1-9999</font></td>
</tr>
<tr>
<td align="right" nowrap>Check:</td>
<td align="left"> <html:checkbox property="check"/></td>
<td> </td>
</tr>
<tr>
<td align="right" nowrap>Phone:</td>
<td align="left"> <html:text property="phone" size="14" maxlength="14"/></td>
<td align="left"> <font size="-1">123-456-7890</font></td>
</tr>
<tr>
<td align="right" nowrap>ZIP:</td>
<td align="left"> <html:text property="zip" size="5" maxlength="5"/></td>
<td align="left"> <font size="-1">12345</font></td>
</tr>
<tr>
<td align="right" nowrap>Email:</td>
<td align="left"> <html:text property="email" size="20" maxlength="40"/></td>
<td align="left"> <font size="-1">you@somewhere.com</font></td>
</tr>
<tr>
<td align="right" nowrap>Text:</td>
<td align="left" colspan="2"> <html:text property="text" size="40" maxlength="40"/></td>
</tr>
<tr>
<td align="right" colspan="3"> <html:submit>ENTER</html:submit> <html:cancel onclick="bCancel=true;">CANCEL</html:cancel></td>
</tr>
</html:form>
<!-- validator:javascript formName="StringForm"/ -->
<script language="javascript">
<!--
function submitForm(form) {
if (validateStringStringForm(form)) {
form.submit.value=" ...";
return true;
}
else return false;
};
// -->
</script>
</table></td></tr>
<tr><td align="center" bgcolor="#EEEEEE"></td></tr>
</table></table></body></html>
1.1 jakarta-struts/contrib/artimus/pages/wizard/Relay.jsp
Index: Relay.jsp
===================================================================
<%--
/**
* Form to enter data.
*
* @author Ted Husted
* @version $Revision: 1.1 $ $dateString: 2001/09/25 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<html:html>
<head>
<title>Form - String</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<html:base/>
</head>
<body bgcolor=#FFFFFF link="#000066" vlink="#660066" alink="#33CCCC"
onload="document.forms[0].elements[0].focus();">
<table width="600" align="center" border="1"><tr><td align="center"><table cellspacing="4">
<tr><td colspan="3">
<html:errors/>
</td></tr>
<html:form action="/wizard/Relay" type="get">
<tr>
<td align="right" nowrap>ID:</td>
<td align="left"> <html:text property="id" size="4" maxlength="4" onblur="this.form.dateString.focus();"/></td>
<td> <font size="-1">1-9999</font></td>
</tr>
<tr>
<td align="right" nowrap>Date:</td>
<td align="left"> <html:text property="dateString" size="10" maxlength="10"/></td>
<td align="left"> <font size="-1">12/12/12</font></td>
</tr>
<tr>
<td align="right" nowrap>Amount:</td>
<td align="left">$<html:text property="amount" size="9" maxlength="9"/></td>
<td> <font size="-1">1-9999</font></td>
</tr>
<tr>
<td align="right" nowrap>Check:</td>
<td align="left"> <html:checkbox property="check"/></td>
<td> </td>
</tr>
<tr>
<td align="right" nowrap>Phone:</td>
<td align="left"> <html:text property="phone" size="14" maxlength="14"/></td>
<td align="left"> <font size="-1">123-456-7890</font></td>
</tr>
<tr>
<td align="right" nowrap>ZIP:</td>
<td align="left"> <html:text property="zip" size="5" maxlength="5"/></td>
<td align="left"> <font size="-1">12345</font></td>
</tr>
<tr>
<td align="right" nowrap>Email:</td>
<td align="left"> <html:text property="email" size="20" maxlength="40"/></td>
<td align="left"> <font size="-1">you@somewhere.com</font></td>
</tr>
<tr>
<td align="right" nowrap>Text:</td>
<td align="left" colspan="2"> <html:text property="text" size="40" maxlength="40"/></td>
</tr>
<tr>
<td align="right" colspan="3"> <html:submit onclick="this.forward=store;">ENTER</html:submit> <html:cancel onclick="bCancel=true;">CANCEL</html:cancel></td>
</tr>
<tr>
<input type="hidden" name="forward" value="error">
<td align="right" colspan="3"> <html:submit onclick="this.forward=confirm;">CONFIRM</html:submit></td>
</tr>
</html:form>
<!-- validator:javascript formName="StringForm"/ -->
<script language="javascript">
<!--
function submitForm(form) {
if (validateStringStringForm(form)) {
form.submit.value=" ...";
return true;
}
else return false;
};
// -->
</script>
</table></td></tr>
<tr><td align="center" bgcolor="#EEEEEE"></td></tr>
</table></table></body></html:html>
1.1 jakarta-struts/contrib/artimus/pages/wizard/Result.jsp
Index: Result.jsp
===================================================================
<%--
/**
* List of articles that match query.
*
* @author Ted Husted
* @version $Revision: 1.1 $ $Date: 2001/11/10 12:05:16 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<head>
<html:base/>
<link rel="stylesheet" type="text/css" href="../../styles/global.css" />
<title>Wizard - Wizard List</title>
</head>
<body>
<table class="parent">
<tr>
<td align="center">
<table class="child">
<tr>
<td align="center" colspan="3">
<bean:write name="RESULT" property="size"/>
matches for
<bean:write name="RESULT" property="description"/>
</td>
</tr>
<logic:notEqual name="RESULT" property="size" value="0">
<tr bgcolor="FFFFEE">
<th>
<span style="text-transform: uppercase">id</span>
</th>
<th>
<span style="text-transform: uppercase">date</span>
</th>
<th>
<span style="text-transform: uppercase">amount</span>
</th>
</tr>
<% int i = 0; %>
<logic:iterate name="RESULT" property="iterator" id="row">
<% i++;
if ( i % 2 == 0) { %>
<tr bgcolor="#EEEEEE">
<% } else { %>
<tr bgcolor="#FFFFFF">
<% } %>
<td align="left">
<bean:write name="row" property="id"/>
</td>
<td align="left" nowrap>
<bean:write name="row" property="date"/>
</td>
<td align="left" width="100%">
<html:link forward="wizard" paramName="row" paramProperty="key" paramId="key"><bean:write name="row" property="check"/></html:link>
</td>
</tr>
</logic:iterate>
</logic:notEqual>
</table>
</td>
</tr>
<tr>
<td class="options">
<html:link forward="done">DONE</html:link>
</td>
</tr>
</table>
</body>
</html:html>
1.1 jakarta-struts/contrib/artimus/pages/wizard/View.jsp
Index: View.jsp
===================================================================
<%--
/**
* Display data entered form (read-only).
*
* @author Ted Husted
* @version $Revision: 1.1 $ $dateString: 2001/08/23 $
*/
--%>
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<html:html/>
<head>
<title>View - String</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<html:base/>
</head>
<body bgcolor=#FFFFFF link="#000066" vlink="#660066" alink="#33CCCC">
<table width="600" align="center" border="1"><tr><td align="center"><table cellspacing="4">
<tr><td colspan="3"><html:errors/></td></tr>
<tr>
<td align="right" nowrap>ID:</td>
<td align="left"> <bean:write name="wizardForm" property="id"/></td>
<td> </td>
</tr>
<tr>
<td align="right" nowrap>Amount:</td>
<td align="left"> <bean:write name="wizardForm" property="amount"/></td>
<td> </td>
</tr>
<tr>
<td align="right" nowrap>Check:</td>
<td align="left"> <bean:write name="wizardForm" property="check"/></td>
<td> </td>
</tr>
<tr>
<td align="right" nowrap>Date:</td>
<td align="left"> <bean:write name="wizardForm" property="dateString"/></td>
<td> </td>
</tr>
<tr>
<td align="right" nowrap>Phone:</td>
<td align="left"> <bean:write name="wizardForm" property="phone"/></td>
<td> </td>
</tr>
<tr>
<td align="right" nowrap>Zip:</td>
<td align="left"> <bean:write name="wizardForm" property="zip"/></td>
<td align="left"> </td>
</tr>
<tr>
<td align="right" nowrap>Email:</td>
<td align="left"> <bean:write name="wizardForm" property="email"/></td>
<td align="left"> </td>
</tr>
<tr>
<td align="right" nowrap>Text:</td>
<td align="left"> <bean:write name="wizardForm" property="text"/></td>
<td align="left"> </td>
</tr>
</table></td></tr>
<tr><td align="center" bgcolor="#EEEEEE"></td></tr>
</table></table></body></html>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>