Flying Saucer: XHTML Forms Support

Previous Page

Next Page

Flying Saucer XML/CSS2 Renderer

XHTML Forms Support

Forms support includes: Any XML/XHTML element can be "replaced" during the rendering cycle with a component that knows how to draw itself. This means we can replace XHTML form elements with, for example, Swing components. It also allows us to replace SVG tags with rendered SVG images, and so on. This page shows how a XHTML form is rendered via Swing; one could also use another GUI toolkit for Java (AWT, Thinlet, etc). FS doesn't currently support form submission out of the box, but it can be added--the Swing components replaced in the page are just normal Swing components to which listeners can be attached. Note that as with HTML, you can freely mix formatted text, images and CSS formatting with form elements.

### Example Form Components

First Name: |
Last Name: |
Address: |
Address (cont.): |
City: |
State: |
Zip: |
Interests: (Select all that apply) |
Favorite Band: |
Contact method: | Mail E-mail
Preferred e-mail format: | No Preference Plain Text XHTML
Chosen Username: |
Password: |
Confirm Password: |
Comments:
Delivery Instructions:
Yes, I would like to be included on your mailing list.
Yes, send me a wad of free cash!