Title: Message
Check out the templates... I forget the exact syntax but basically you look up the field errors from the Map returned from getFieldErrors... this will return either null or a List of error strings, which you can iterate to display.
-----Original Message-----
From: Ray Henry [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 4:00 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] how to access validation errors

Here is the jsp:

 

<%@ taglib uri="webwork" prefix="webwork" %>

<h1>Login</h1>

 

<webwork:if test="hasErrors()">

  ERROR:<br />

  <font color="red">

    <webwork:iterator value="actionErrors">

      <webwork:property/><br />

    </webwork:iterator>

  </font>

</webwork:if>

 

<form name="loginForm" action="" method="POST">

User name:

<input name="username" /><br />

Password:

<input name="password" /><br />

<input type="submit" value="Login" />

</form>

 

 

How can I put the field-level errors above the INPUT boxes?

 

Thanks.

 

 

 

 

Reply via email to