struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henrik Brautaset Aronsen <>
Subject Re: Visible form validation missing after upgrade from 2.0.11 to 2.1.6
Date Tue, 31 Mar 2009 15:08:58 GMT
On 31-03-09 16:15, Henrik Brautaset Aronsen wrote:
> On 31-03-09 15:12, Henrik Brautaset Aronsen wrote:
>> The form validation error messages are missing after I upgraded from 
>> 2.0.11 to 2.1.6, and I can't figure out why.  When I submit an 
>> invalid form, the form just comes back without the visible error 
>> messages.
> ...
>> The jsp:
>> ...
>> <s:form action="MySupport" cssClass="settings">
>> <table>
>> <s:textfield label="Category " name="form.supportCategory" />
>>         ...
>> <input type="submit" value="Send e-mail"/>
>> </table>
>> </s:form>
> I've done some more digging:  I can see the error messages by using 
> <s:fielderror/> [1], but why aren't they automatically attached to the 
> <s:textfield> like they were in Struts 2.0.x?

  .. and some more digging.  We have our own controlfooter.tpl, and the 
fieldErrors should have been rendered there (TEST1 is shown, TEST2 is not):

<#if hasFieldErrors>TEST2
<#list fieldErrors[] as error>

hasFieldErrors is never true, even though they should have been (because 
<s:fielderror/> certainly show errors.   I've even inserted the 
hasFieldErrors assignment from the struts2-core jar, but it didn't help:

<#assign hasFieldErrors = && fieldErrors?? && 

Still talking to myself,

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

View raw message