struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject Re: [s2] Validation
Date Wed, 02 Aug 2006 16:21:41 GMT
On 8/2/06, Patrick Lightbody <> wrote:
> Perhaps the best thing to do to address these little issues is to mock out what an
>ideal webapp would look like using ideal configurations/annotations.

I'm trying to do that now with the MailReader application, but I'm
running into wildcard issues :(

Film at 11.

One notion would be the idea of using a combined
mapping/validation/message configuration as a "code-behind", and then
offering the same utilty via annotations.

So, for a given Action class, we might have a single XML, along the lines of

<package name="Registration.Retrieve" namespace="/Registration"
<action name="Retrieve" class="mailreader2.Registration.Retrieve">
    <result name="input">/pages/Registration.jsp</result>
    <result type="redirect-action">MainMenu</result>
    <interceptor-ref name="guest"/>

    <field name="username">
        <field-validator type="requiredstring">
            <message key="error.username.required"/>
    <field name="password">
        <field-validator type="requiredstring">
            <message key="error.password.required"/>

  <locale name="en">
   <text>User Name is required</key>
<   text>Password is required</key>


Which would not necessarily obviate have separate -validation,
-action, and -message files, if desired.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message