Commits

Anonymous committed 4b1f229

- use <ww:head /> tag
- use <ww:errorfield /> and <ww:fielderror /> tag when appropriate.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@1857573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 2670d4e

Comments (0)

Files changed (3)

webapps/showcase/src/webapp/validation/fieldValidatorsExample.jsp

 	<head>
 		<title>Showcase - Validation - Field Validators Example</title>
 		<ww:url id="siteCss" includeContext="true" value="/validation/validationExamplesStyles.css" />
-		<link rel="stylesheet" type="text/css" href='<ww:property value="%{siteCss}" />'>
+		<ww:head />
+		<!--  link rel="stylesheet" type="text/css" href='<ww:property value="%{siteCss}" />'-->
 		</style>
 	</head>
 	<body>
 	
 	<!-- START SNIPPET: fieldValidatorsExample -->
 	
+		<h3>All Field Errors Will Appear Here</h3>
+		<ww:fielderror />
+		<hr/>
+		
+		<h3>Field Error due to 'Required String Validator Field' Will Appear Here</h3>
+		<ww:fielderror>
+			<ww:param value="%{'requiredStringValidatorField'}" />
+		</ww:fielderror>
+		<hr/>
+		
+		<h3>Field Error due to 'String Length Validator Field' Will Appear Here</h3>
+		<ww:fielderror>
+			<ww:param>stringLengthValidatorField</ww:param>
+		</ww:fielderror>
+		<hr/>
+	
 		<ww:form action="submitFieldValidatorsExamples" namespace="/validation" method="POST">
 			<ww:textfield label="Required Validator Field" name="requiredValidatorField" />
 			<ww:textfield label="Required String Validator Field" name="requiredStringValidatorField" />
 			<ww:submit label="Submit" />
 		</ww:form>
 		
-    <!-- END SNIPPET: fieldValidatorsExample --> -->
+    <!-- END SNIPPET: fieldValidatorsExample -->
 		
 		
 		<ww:include value="footer.jsp" />

webapps/showcase/src/webapp/validation/nonFieldValidatorsExample.jsp

 	<head>
 		<title>Showcase - Validation - Non Field Validator Example</title>
 		<ww:url id="siteCss" value="/validation/validationExamplesStyles.css" includeContext="true" />
-		<link rel="stylesheet" type="text/css" href='<ww:property value="%{siteCss}" />'>
+		<ww:head />
+		<!-- link rel="stylesheet" type="text/css" href='<ww:property value="%{siteCss}" />'-->
 	</head>
 	<body>
 	
 	   
 	   <!-- START SNIPPET: nonFieldValidatorsExample -->
-	
-	
-		<ww:if test="hasActionErrors()">
-			<ww:iterator value="getActionErrors()" status="iteratorStatus">
-			 	<ul>
-					<li><span class="errorMessage"><ww:property value="top" /></span></li>
-				</ul>
-			</ww:iterator>
-		</ww:if>
+		<ww:actionerror />
 	
 		<ww:form method="POST" action="submitNonFieldValidatorsExamples" namespace="/validation">
 			<ww:textfield name="someText" label="Some Text" />

webapps/showcase/src/webapp/validation/visitorValidatorsExample.jsp

 <html>
 <head><title>Showcase - Validation - VisitorValidatorsExample </title>
 		<ww:url id="siteCss" value="/validation/validationExamplesStyles.css" includeContext="true" />
-		<link rel="stylesheet" type="text/css" href='<ww:property value="%{siteCss}" />'>
+		<ww:head />
+		<!-- link rel="stylesheet" type="text/css" href='<ww:property value="%{siteCss}" />' -->
 </head>
 <body>
 
 	<!-- START SNIPPET: visitorValidatorsExample -->
+	
+	<ww:fielderror />
 
 	<ww:form method="POST" action="submitVisitorValidatorsExamples" namespace="/validation">
 		<ww:textfield name="user.name" label="User Name" />