You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ws...@apache.org on 2006/05/05 08:30:56 UTC
svn commit: r399989 -
/struts/action/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
Author: wsmoak
Date: Thu May 4 23:30:55 2006
New Revision: 399989
URL: http://svn.apache.org/viewcvs?rev=399989&view=rev
Log:
Change the signature of the call to get the ModuleConfig to use the ServletContext.
This was raising a NPE when not dispatched through the request processor first.
This also fixes the "Log on" link in the Faces Mailreader (example1).
Issue: STR-2509
Submitted by: Gary VanMatre
Modified:
struts/action/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
Modified: struts/action/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java?rev=399989&r1=399988&r2=399989&view=diff
==============================================================================
--- struts/action/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java (original)
+++ struts/action/trunk/faces/src/main/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java Thu May 4 23:30:55 2006
@@ -34,6 +34,7 @@
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.Tag;
+import javax.servlet.ServletContext;
import org.apache.commons.validator.Field;
import org.apache.commons.validator.Form;
@@ -270,7 +271,9 @@
StringBuffer results = new StringBuffer();
HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- ModuleConfig config = ModuleUtils.getInstance().getModuleConfig(request);
+ ServletContext servletContext = pageContext.getServletContext();
+ ModuleConfig config = ModuleUtils.getInstance().getModuleConfig(request, servletContext);
+
ValidatorResources resources =
(ValidatorResources) pageContext.getAttribute(
ValidatorPlugIn.VALIDATOR_KEY + config.getPrefix(),