Dynamic Forms Edit tool
As part of the ESIWEB project, I created a web-based tool to create and edit dynamic forms (described in a previous post). The tool consists of a JSP page to allow users to edit form properties and add/delete/reorder form questions. There is another JSP page to modify question properties for a specific question selected on the form JSP page. The tool uses a servlet to handle processing of all requests. Some of the functionality on the form editing page, specifically re-ordering of questions, is handled using Ajax to modify data on the server without re-drawing the entire page. The form editing page, in addition to editing functions, allows the user to preview the form and preview the email that will be generated containing the form link.
I also added the capability to supply an image that will be used at the top of the form, instead of the ESI logo. In order to implement this, I used an HTML file input element to allow the user to select an image from their file system and used a com.oreilly.servlet.MultipartRequest object to retrieve the multi-part form data. The image data is converted to a byte[] and saved as a FormBean bean property. I created a servlet to read the bean data, generate a BufferedImage object, resize the image if it is too large, and stream the image. The form designer can see the image they have selected in the form design tool.
I also added the capability to supply an image that will be used at the top of the form, instead of the ESI logo. In order to implement this, I used an HTML file input element to allow the user to select an image from their file system and used a com.oreilly.servlet.MultipartRequest object to retrieve the multi-part form data. The image data is converted to a byte[] and saved as a FormBean bean property. I created a servlet to read the bean data, generate a BufferedImage object, resize the image if it is too large, and stream the image. The form designer can see the image they have selected in the form design tool.

0 Comments:
Post a Comment
<< Home