Is there a tool to generate web pages based on Java beans?
-
08-07-2019 - |
Question
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...
Solution
Have a look at Grails, in particular Scaffolding. It's a Groovy framework, but your POJOs will plug straight in.
OTHER TIPS
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?