DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32270>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32270 Summary: Let JavasvriptValidatorTag use custom MessageResources for i18n texts Product: Struts Version: 1.2.4 Platform: PC OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Validator Framework AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have a setup where setting a common MessageResources in struts-config.xml isn't possible. See this [EMAIL PROTECTED] thread http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&by=thread&from=935909 I have researched on JavascriptValidatorTag and MessagesTag and found that MessagesTag (by TagUtils) is already looking for the MessageResources on the pageContext, the request and the servletContext (in that order). There by I can easily override the MessageResources by extending the RequestProcessor and add the right MessageResources to the request in processPreprocess(...) This works for MessagesTag, but not JavascriptValidatorTag because it only looks in the servletContext (without TagUtils). The following two patches makes JavascriptValidatorTag use TagUtils too: src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java: 414,416c414,417 < (MessageResources) pageContext.getAttribute( < bundle + config.getPrefix(), < PageContext.APPLICATION_SCOPE); --- > TagUtils.getInstance().retrieveMessageResources( > pageContext, > bundle, > false); src/share/org/apache/struts/taglib/TagUtils.java: < private MessageResources retrieveMessageResources( --- > public MessageResources retrieveMessageResources( -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
