<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=dpedowitz" rel="nofollow">David Pedowitz</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4774?redirect=false" rel="nofollow">SPR-4774</a></strong> and commented</p>
<p dir="auto">More brainstorming from training session in LA, 5/1/08 with Chris Beams, Tchavdar Ivanov (FIM) and myself.</p>
<p dir="auto"><code class="notranslate">@Validator</code> could be a class level annotation eligible for component scans, the methods of which could be annotated with <code class="notranslate">@Validate</code> (or similar) which would enable method/request param specific validation within the request handling workflow</p>
<ul dir="auto">
<li>Like the <code class="notranslate">@HandlerInterceptor</code> design (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398087974" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9447" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9447/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9447">#9447</a>) <code class="notranslate">@Validator</code> could take a list of <code class="notranslate">@Controller</code> classes for a more fine grained approach or <code class="notranslate">@Controller</code> could take a list of <code class="notranslate">@Validator</code> which would match the current register model (I think I like the later)</li>
</ul>
<p dir="auto"><code class="notranslate">@Validate</code> would define a method used to validate an <code class="notranslate">@RequestParam</code>, it'd might be neat if it handled superset of <code class="notranslate">@RequestParam</code> and <code class="notranslate">@RequestMapping</code> arguments for a very fine grained approach, i.e. <code class="notranslate">@Validate</code>("reward", method=RequestMethod.POST).</p>
<ul dir="auto">
<li>Another option would be to register the Validator with the <code class="notranslate">@RequestParam</code></li>
</ul>
<p dir="auto">Hope you dig the ideas</p>
<hr>
<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)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398150730" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14072" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14072/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14072">#14072</a> Improve support for registering Validator implementations in Spring MVC (<em><strong>"is superseded by"</strong></em>)</li>
</ul>
<p dir="auto">9 votes, 10 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=skaffman" rel="nofollow">Kenny MacLeod</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3219?redirect=false" rel="nofollow">SPR-3219</a></strong> and commented</p>
<p dir="auto">When using the form:options tag where the items data is a Map, the itemLabel and itemValue attributes are ignored.  Instead, the rendering logic simply uses the toString() of the map key for the option's value, and the toString() of the map value as the option's label.  This isn't much use when either the map key or value is a bean.</p>
<p dir="auto">A more sensible approach would be to use the itemValue attribute to retrieve a property of the map key, and the itemLabel attribute to retrieve a property of the map value.</p>
<p dir="auto">Alternatively, since Map.Entry is itself bean-compliant, the itemValue and itemLable values could be used as properties of the Map.Entry, e.g. itemValue="key.x" or itemLabel="value.y"</p>
<p dir="auto">This was previously raised as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398071360" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7349" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7349/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7349">#7349</a>, but I thought it warranted a bug report.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.2</p>
<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="398071360" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7349" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7349/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7349">#7349</a> Make itemLabel/itemValue meaningful in map-based option rendering? (<em><strong>"duplicates"</strong></em>)</li>
</ul>