You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mariano Ayesa <ma...@gmail.com> on 2005/02/23 22:52:02 UTC

Too much javascript code with struts validation framework

Hi all!
I´m trying struts validation framework and I would like to know if
there is a way to tell Struts to include only javascripts functions
needed by a particular JSP. I have noticed that Struts adds every rule
configured in validator-rules in each generated HTML and this makes
pages too much heavy.
Please let me know if I made myself clear..
Thanks in advance.
-- 
Mariano J. Ayesa - Linux user.

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


Re: Too much javascript code with struts validation framework

Posted by Max Cooper <ma...@maxcooper.com>.
You don't have to statically include all the JavaScript in each page.
You can use a dynamic include, allowing the JavaScript to cache in the
browser instead.

See the dynamicJavascript and staticJavascript attributes of the Struts
html:javascript tag.

-Max

On Wed, 2005-02-23 at 18:52 -0300, Mariano Ayesa wrote:
> Hi all!
> I´m trying struts validation framework and I would like to know if
> there is a way to tell Struts to include only javascripts functions
> needed by a particular JSP. I have noticed that Struts adds every rule
> configured in validator-rules in each generated HTML and this makes
> pages too much heavy.
> Please let me know if I made myself clear..
> Thanks in advance.


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