Does Java Spring 3.0 MVC support client-side support based on annotation / attribute like Asp.net MVC 2.0?

In Asp.Net MVC 2.0, at least in beta, you can decorate model classes with data annotation attributes and enable client-side validation that uses these criteria defined in your model data annotations. Is there something similar for Java Spring MVC 3.0?

Is it possible to embed a component in the response pipeline that can validate simulated annotated properties and visualize client-side validation logic in addition to the server-side validation logic that is called before the controller that processes the request?

+3
source share
5 answers

Spring MVC is a pretty low-level structure. It does not apply to client-side validation.

There are other Java Web environments that do this, such as Tapestry, Wicket, and JSF (IceFaces, etc.). This is what I call "components."

+2
source

In fact, there is something a bit similar to it, based on the JSR-303 Bean Validation specification, which is now final and fully supported by Spring 3.0 .

Recently, as part of Spring Webflow, Springsource has released Spring JS (javascript) that uses Dojo. You can use this for client side validation. Check out this way.

, -, Wicket (, fraido), usecase. , , , , . , , Spring JS/Bean .

+4

Spring MVC 3.0 .
cletus , , Tapestry (ex), Wicket (ex), , JavaScript ..
Jstl taglib, , JS (jQuery,...) : jQuery

edit. : Mediawidget. , . : "Metawidget Bean , / , .. "

Spring Link1, Link2

+2

, : http://kenai.com/projects/jsr303js

2011-12-06: .

2013-12-09: : , . ( Spring, ), , . , , , , - , ? , .

+1

, , , Spring -MVC - , JSF, .

0

Source: https://habr.com/ru/post/1737253/


All Articles