Java POJO representing HTML controls?
Well, it may be a idiot idea... Bu开发者_JS百科t we need DropDownList.java to wrap all data of a "List employees" dropdown list. The object is populated at server side and used by JSP and javascript (json) for rendering view. Just something like org.apache.struts2.components.Select but in POJO format.
We already created our own classes but if there is some good framework or lib that made that kind of stuff, we would willingly use it.
Thanks alot
There is Java HTML Generator but the API is a bit clumsy. If you can, write the HTML generator in Groovy using the Builder API.
Groovy code is compiled to normal class files which just needs the groovy.jar on the classpath.
Have you considered using Google's Web Toolkit (GWT)?
This is probably one the cleanest solutions for rendering browser content I have seen. POJO's are "compiled" into native JScript and HTML by GWT. Concerns about browser compatability are dealt with by GWT.
After completing a large project using GWT I can testify that this is very much a production ready tool, both scalable and responsive.
精彩评论