[ https://issues.apache.org/jira/browse/PIVOT-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054535#comment-13054535 ]
dreamtangerine commented on PIVOT-761: -------------------------------------- Hi all. I want to collaborate in this issue. Here are some random thinking. * I think that something like http://java.sun.com/developer/technicalArticles/J2SE/constraints/annotations.html, will be very useful. The idea is get validators from JavaBeans. So when you store the bean from Form, a validation process validate values (in the BeanAdapter put method or in a derived one like BeanAdapterValidator). I have a partial implementation without BeanAdapter based in the ideas of the link. * In the BeanAdapter.put method change return null for a list of violated constraints. The form can extract the violated constraints from the list and mark the errors. * We can fusion the the current validators with validators from JavaBeans. When you load the form, you can set the old validators mapping then from the JavaBeans (with a conversion table or using annotations). Maybe the form need separated methods ones for no validations an other for validations for efficient reasons. * I think the flag's Form infrastructure is enough to mark errors plus an error label in the form. That label can be set like a property of the form ( to be set in XML also). That is all. DreamTangerine > Test a more generic Validation approach on fields and Containers (Forms, etc) > ----------------------------------------------------------------------------- > > Key: PIVOT-761 > URL: https://issues.apache.org/jira/browse/PIVOT-761 > Project: Pivot > Issue Type: Brainstorming > Components: wtk > Reporter: Sandro Martini > Assignee: Sandro Martini > Priority: Minor > Fix For: 2.1 > > > Investigating on this field ... both on validating single fields (not only > text input fields) and Container (like Forms), like in JSF. > Some reference here: > http://apache-pivot-developers.417237.n3.nabble.com/Text-validators-td3078385.html > General idea: put investigation code under /skunk and the minimal set of > interfaces and classes, and the rest outside (in a dedicated subproject, here > or under apache-extras). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira