<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=tedberg" rel="nofollow">Ted Bergeron</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4528?redirect=false" rel="nofollow">SPR-4528</a></strong> and commented</p>
<p dir="auto">Based on my article:  <a href="http://www.triview.com/articles/hibernate/validator/canmeetyourneeds.html" rel="nofollow">http://www.triview.com/articles/hibernate/validator/canmeetyourneeds.html</a>  provide built in integration with hibernate validator.</p>
<p dir="auto">This may be broken down into several issues:</p>
<ol dir="auto">
<li>Extend JSP tag library to search for validation annotations via reflection.  Render fields with css classes such as required, email, etc.  Add maxlength attribute, etc.</li>
<li>Native support to invoke the proper Hibernate ClassValidator and convert the InvalidValue array to a Spring Errors object.</li>
<li>Extend JSP tags to render semantic html wrapper around form fields.  Include div, label and field.</li>
<li>Extend JSP tags to render with enhanced features, such as adding popup calendar for Date.  Consider extracting info from assigned PropertyEditor.</li>
<li>Add basic, included JavaScript validation support and/or integration with a major javascript framework such as prototype, jquery, ext, etc.</li>
</ol>
<hr>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/13732/triview_custom_tags.zip" rel="nofollow">triview_custom_tags.zip</a> (<em>6.05 MB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/13733/validator_whitepaper.zip" rel="nofollow">validator_whitepaper.zip</a> (<em>7.57 MB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398048646" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/4803" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/4803/hovercard" href="https://github.com/spring-projects/spring-framework/issues/4803">#4803</a> Support for declarative validation (Hibernate Validator, anticipating JSR 303) (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">2 votes, 3 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jacorob" rel="nofollow">Bob Jacoby</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7940?redirect=false" rel="nofollow">SPR-7940</a></strong> and commented</p>
<p dir="auto">One of my beans (using the <code class="notranslate">@Component</code> annotation) implements the ApplicationListener interface. The bean is also proxied (uses the <code class="notranslate">@Transaction</code> annotation on a few methods). After initializing the context my AbstractApplicationEventMulticaster defaultRetriever contains the bean instance in the applicationListener set, and the name of the bean in the applicationListenerBeans set.</p>
<p dir="auto">This causes a problem when the listeners are retrieved (AbstractApplicationEventMulticaster getApplicationListeners):<br>
for (ApplicationListener listener : this.defaultRetriever.applicationListeners) {<br>
if (supportsEvent(listener, eventType, sourceType)) {<br>
retriever.applicationListeners.add(listener);<br>
allListeners.add(listener);<br>
}<br>
}<br>
if (!this.defaultRetriever.applicationListenerBeans.isEmpty()) {<br>
BeanFactory beanFactory = getBeanFactory();<br>
for (String listenerBeanName : this.defaultRetriever.applicationListenerBeans) {<br>
ApplicationListener listener = beanFactory.getBean(listenerBeanName, ApplicationListener.class);<br>
if (!allListeners.contains(listener) &amp;&amp; supportsEvent(listener, eventType, sourceType)) {<br>
retriever.applicationListenerBeans.add(listenerBeanName);<br>
allListeners.add(listener);<br>
}<br>
}<br>
}</p>
<p dir="auto">First all the listener bean instances are added to the list. Then the beans are retrieved from the beanfactory via the name. However, the bean factory will return the proxy rather than the bean itself. End result will be that both the bean and the proxy surrounding the bean are added to the allListeners list, which results in the onApplicationEvent being called twice for every event.</p>
<p dir="auto">Ideally the proxy would be the only one added to the list.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/19458/SPR-7940.zip" rel="nofollow">SPR-7940.zip</a> (<em>5.96 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398154622" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14597" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14597/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14597">#14597</a> Documentation inconsistency vs implementation - scoped-proxy beans (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/7b703b7e9b6d31d2d09cb977e59c83f65bd70b6f/hovercard" href="https://github.com/spring-projects/spring-framework/commit/7b703b7e9b6d31d2d09cb977e59c83f65bd70b6f"><tt>7b703b7</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/924c869b8adeaf8fe3da047d0bbf0137ffa9ddce/hovercard" href="https://github.com/spring-projects/spring-framework/commit/924c869b8adeaf8fe3da047d0bbf0137ffa9ddce"><tt>924c869</tt></a></p>
<p dir="auto">2 votes, 5 watchers</p>