You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Duan Qiang <qd...@ilog.com.sg> on 2003/06/11 09:14:04 UTC

how to get the error message in java code

Hi,

How can I get the error message for a certain field so that I can customize
the field contents (styleClass)?

What I need is to change the style class of a certain field if there is
error message, and show the error message on the specified layer <div>

For example,

<html:text property="abc" onmouseover="javascript:showErrorMessage("<%=
errorText %>")" onmouseout="javascript:resetErrorMessage();"
styleClass="XXX" />

The function showErrorMessage shows the error text for this field and the
other resetErrorMessage cleares the error message. It seems that I need to
get the errorText for this property but I do not know how.

Thx for your help.

Regards,

Dq


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org