struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Gunter <>
Subject Displaying maps with JSON plugin
Date Sat, 22 May 2010 17:19:08 GMT
I'm using Struts-'s JSON plugin to try and display the field 
errors that are accrued by the validation interceptor. What I've got is 

Java snippet from the action:

public Map getAllErrors()
         return getFieldErrors();

public String getNewEmail()
         return this.newEmail;

The result type snippet is this:

<result name="error" type="json">
<param name="includeProperties">allErrors</param>

This is the result I get when I fire a blank email address (the 
validator is requiredstring):

Now, when I change the result type snippet to this:

<result name="error" type="json">
<param name="excludeProperties">newEmail</param>

I get this result:

{"allErrors":{"newEmail":["No email address submitted"]}}

I'm confused by this.

Any help is appreciated =)

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

View raw message