You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Néstor Boscán <ne...@tcs.com.ve> on 2008/03/16 20:30:21 UTC

Struts2 - Can I access the form object from fielderror.ftl

Is there a way to access the form object from fielderror.ftl. I need to
access the form Id.
 
Regards,
 
Néstor Boscán

Re: Struts2 - Can I access the form object from fielderror.ftl

Posted by Martin Gainty <mg...@hotmail.com>.
you can if you use a combination of Freemarker AND dojo ..
assume you have <form id="formId"..>

<script type="text/javascript">
dojo.require("dojo.event.*");
<#if (parameters.formId?if_exists?size > 0)>
  var containingForm = document.getElementById("${formId}");

Anyone else?
Martin-

----- Original Message -----
From: "Néstor Boscán" <ne...@tcs.com.ve>
To: <us...@struts.apache.org>
Sent: Sunday, March 16, 2008 2:30 PM
Subject: Struts2 - Can I access the form object from fielderror.ftl


Is there a way to access the form object from fielderror.ftl. I need to
access the form Id.

Regards,

Néstor Boscán


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org