Struts2 dynamic form elements

Posted by bozo on Stack Overflow See other posts from Stack Overflow or by bozo
Published on 2010-04-02T16:21:09Z Indexed on 2010/04/02 16:23 UTC
Read the original article Hit count: 325

Filed under:

Hi,

I would like to create little higer-level framework on top of Stuts2 which can take form element description from Action and render a complete form, in order to avoid having a separate JSP files with hardcoded form elements for every form in a large web application (so if I manage to do this I will have just a few generic JSPs for data form and few for layout). Application is extremely data-driven.

My idea is to create form description using custom objects in the Action (i.e. Button, TextInput etc.) and then to create a single JSP page that will render eveything out.

What is the best way of doing this? Can you propose some concrete way to do this?

I don't want to write something if I can reuse the existing code with some effort.

Any ideas are appreciated.

Kind regards,

Bozo

© Stack Overflow or respective owner

Related posts about struts2