struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "j alex" <strutstwou...@gmail.com>
Subject S2 : Parameterized error messages
Date Wed, 08 Aug 2007 13:15:50 GMT
Hi,

Is there a way to customize the error message with multiple keys provided
from the resource bundle, using the XML/annotation approach ?

In S1, we could do :

            <field property="primaryApplicant.firstName" depends="required">
                <arg0 key="error.pleaseenter" />
                <arg1 key="error.firstapplicantName.required" />
            </field>

In S2 ; we use <message> to denote the error message ; but to what level can
we customize it? ; can it be partially constant and varying?

This could be useful if we use Visitor field validation, reuse the domain
model for different actions and want the message to be different when
invoked  by each action or if the model is used in different instances
(which i'm yet  to figure out!)

Thanks,
Joseph

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message