English 中文(简体)
从POJO说明控制 UI 组件
原标题:Controlling the UI Component from POJO annotations

I m working in a Java EE web application using Hibernate, Spring, JSF and Primefaces.

My Question is how can I control the UI components (jsf and primefaces components) using POJO annotations.
Is there any framework I can add to my project to do this?

example :

class user {
   @NotNull @Max=100
   public String name;
}

与名称 Atritt 相关联的 UI 元件必须验证字符串主菜( 不是空的, 也不是免去 100 字节 ) 。

最佳回答

这被称为< a href=> http://docs.oracle.com/javaee/6/tutory/doc/ gircz.html' rel=“nofollow noreferr” >bean 验证 ,又称