简体   繁体   中英

Is there a tool to generate web pages based on Java beans?

Is there a tool that will take you java beans (pojos) and automatically make them a form for a webpage?

To be more clear I have a bunch of Jaxb objects that I want to be able to display in a form without having to code a bunch of html. Is there a tool that will read the jaxb objects and generate the editable form for me? Also, this needs to run on a glassfish server...

If I interpret your question quite literally, then you should take a look at the ROMA framework: http://www.romaframework.org/ . It tries to take POJOs (beans) which are annotated and automatically generate user interfaces.

I presume that the question was intended to be

'How do I render a HTML form that represents all of the fields for a given bean - this will save me from having to manually typing the HTML'

Theoretically, this is possible through reflection, but it's always tricky to know which fields should be included, so the results would not always be what you intended.

Can you confirm the motives behind the question?

Have a look at Grails , in particular Scaffolding . It's a Groovy framework, but your POJOs will plug straight in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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