[
https://issues.apache.org/jira/browse/VALIDATOR-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb resolved VALIDATOR-270.
----------------------------
Resolution: Invalid
Does not appear to relate to Commons Validator
> allow to determine NLS resource by other inputs via call-back method
> --------------------------------------------------------------------
>
> Key: VALIDATOR-270
> URL: https://issues.apache.org/jira/browse/VALIDATOR-270
> Project: Commons Validator
> Issue Type: New Feature
> Affects Versions: 1.3.1 Release
> Environment: jdk1.5+
> Reporter: Ralf Hauser
>
> in our struts application, a form field that is for example too long can not
> be named depending on the locale alone, but also on other factors
> in order to allow for this, a call-back method would need to access the
> HttpServlet and HttpServletRequest in order to be able to access the
> ServletContext and HttpSession that allow to determine which resource to take.
> Therefore, it would be great if the DTD had 3 more optional attributes to the
> <msg> tag:
> 1) "callBackMethod" (e.g. "org.apache.myApp.NameChooser.determine")
> 2) "callBackParameters" (e.g.
> "javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServlet" -
> commaSeparated), obviously, only classes allowed that are available at the
> point where a validate() is executed
> 3) "callBackNames" (e.g. in a struts action or jsp, this would be
> "request,servlet" or if the Parameter were "javax.servlet.ServletContext",
> the name in a jsp would be "pageContext")
> Alternatively, the arguments might be handed over in a generic object array?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)