try this
<s:iterator value="fieldErrors.foo">
<s:property/> <br/>
</s:iterator>
2010/10/10 Dave Newton <[email protected]>:
> There can be more than one error; it's a collection.
>
> Dave
>
> On Sunday, October 10, 2010, Altenhof, David Aron <[email protected]> wrote:
>> Working on first Struts2 project, and quickly found out that standard themes
>> can produce some quirky output. (Hoping to write my own when I get some
>> time). I decided to simply use the "simple" theme to give me the most
>> control over HTML formatting. However, it doesn't display field errors from
>> validation. So I tried adding this to jsp where I want the error message to
>> pop up:
>>
>> <s:property value="fieldErrors.fname"/>
>>
>> ... where "fname" is the field that failed validation. This
>> works, but the error message always gets rendered back wrapped in brackets:
>>
>> [You must enter a first name]
>>
>> Of course, one could write some nasty code to strip out the brackets, but
>> there must be an easier way.
>>
>> Thanks for any help,
>>
>> David
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]