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 08:51:46 UTC

how can I override the message resources

Hi,

I'd like to override the behaviour of the <bean:message key="abc"/> so that
it simply returns the key without prefixing ??? and suffix ???.

For example, when the key abc does not exist in the message bundle, simple
return "abc".

    <init-param>
      <param-name>application</param-name>
      <param-value>
       i18n.LsrMessageResources
      </param-value>
    </init-param>

When I defined a class named i18n.LsrMessageResources extending the
MessageResources class, it simply does not called.

thx.

dq


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


how to get the error message in java code

Posted by Duan Qiang <qd...@ilog.com.sg>.
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