简体   繁体   English

在编译时从Java bean生成HTML

[英]generate html from java beans - at compile time

I have a bunch of Java beans. 我有一堆Java豆。 All of them are simple but some of them have more than 50 fields. 它们都很简单,但是其中一些具有50多个字段。 So it will take a lot of time of write HTML for them. 因此,为他们编写HTML需要很多时间。

I want to know if there is a utility (preferable command line) I can use to generate HTML forms from the Java classes. 我想知道是否存在可以从Java类生成HTML表单的实用程序(首选命令行)。

Note that I don't need to do this dynamically or anything. 请注意,我不需要动态地执行此操作或执行任何操作。 I need to do this before compile time. 我需要在编译之前执行此操作。

Something like grails generate-views but without the GSP markup grails这样的东西会生成视图,但是没有GSP标记

Another option to the ones listed by jdevelop is Apache Isis . jdevelop列出的另一个选择是Apache Isis It provides several viewers of your domain objects (ie POJOs + some optional extras) - Apache Wicket based viewer and JAX-RS based one. 它为您的域对象提供了多种查看器(即POJO和一些可选的附加功能)-基于Apache Wicket的查看器和基于JAX-RS的查看器。

you might want to take a look at Apache Wicket and it's tools: 您可能想看看Apache Wicket及其工具:

https://sites.google.com/site/wicketrad/ https://sites.google.com/site/wicketrad/

http://wicketwebbeans.sourceforge.net/ http://wicketwebbeans.sourceforge.net/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM