You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Musachy Barroso <mu...@gmail.com> on 2009/03/31 17:22:49 UTC
Re: Visible form validation missing after upgrade from 2.0.11 to
2.1.6
yeah you need the assignment. Put a breakpoint in
ActionSupport.getFieldErrors() and see if it is getting called.
musachy
On Tue, Mar 31, 2009 at 11:08 AM, Henrik Brautaset Aronsen
<st...@henrik.synth.no> wrote:
> hasFieldErrors
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Visible form validation missing after upgrade from 2.0.11 to
2.1.6
Posted by Henrik Brautaset Aronsen <st...@henrik.synth.no>.
On 31-03-09 17:48, Henrik Brautaset Aronsen wrote:
> On 31-03-09 17:22, Musachy Barroso wrote:
>> yeah you need the assignment. Put a breakpoint in
>> ActionSupport.getFieldErrors() and see if it is getting called.
>
> Thanks for your answer. I put a checkpoint in there, and
> getFieldErrors() is definitely called (about five times per field, it
> seems).
Here's my full template, in case it provides more insight:
text.ftl:
<#include "/${parameters.templateDir}/mytheme/controlheader.ftl" />
<#include "/${parameters.templateDir}/simple/text.ftl" />
<#include "/${parameters.templateDir}/mytheme/controlfooter.ftl" />
controlheader.ftl:
<#assign hasFieldErrors = parameters.name?? && fieldErrors?? &&
fieldErrors[parameters.name]??/>
<tr>
<td>
<#if parameters.label?exists>
<label <#t/>
<#if parameters.id?exists>
for="${parameters.id?html}" <#t/>
</#if>
<#if hasFieldErrors>
class="errorLabel"<#t/>
<#else>
class="label"<#t/>
</#if>
><#t/>
${parameters.label?html}:
<#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
</label><#t/>
</#if>
</td>
<td>
controlfooter.ftl:
</td>
<td>TEST1
<#if hasFieldErrors>TEST2
<#list fieldErrors[parameters.name] as error>
<div<#rt/>
<#if parameters.id?exists>
errorFor="${parameters.id}"<#rt/>
</#if>
class="errorMessage">
${error?html}
</div><#t/>
</#list>
</#if>
</td>
</tr>
Best regards,
Henrik
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Visible form validation missing after upgrade from 2.0.11 to
2.1.6
Posted by Henrik Brautaset Aronsen <st...@henrik.synth.no>.
On 31-03-09 17:22, Musachy Barroso wrote:
> yeah you need the assignment. Put a breakpoint in
> ActionSupport.getFieldErrors() and see if it is getting called.
>
Thanks for your answer. I put a checkpoint in there, and
getFieldErrors() is definitely called (about five times per field, it
seems).
Henrik
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org