You could add errorClassId on the input element and use CSS to insert an image of a little red *... :-) I can't think of a clean way to find out if an error exists for a particular property though. This might work (haven't tried it):

  <c:if test="${not empty messages.message['property']}">*</c:if>

L.

Aleksandar Matijaca wrote:

Hi there,
I am currently using the struts validator, and it is working pretty good.
My basic error block looks like this:


<logic:messagesPresent>


<table>
<tr>
<td colspan="2"><font color="red"><bean:message key="errorTitle" /></font></td>
</tr>
<html:messages id="error">

<tr>
<td>&nbsp;&nbsp;</td>
<td><font color="red"><bean:write name="error" /></font></td>
</tr>
</html:messages>
</table>

</logic:messagesPresent>
As I said, it loks fairly simple and it works. HOWEVER, I would like
to automatically place a little red * right beside the input field.
For my password confirmation field, wnen I put

<html:errors property="confirm_password"/>

beside the text field, I get the WHOLE STRING for the 'required' validation,
instead, I would like to display only a *. I tried
 <html:errors property="confirm_password">*</html:errors>
 But that does not work, because html:errors tag does not take a body...
 Any ideas?
 Thanks, Alex.



--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to