JXPath binding with Flowscript
Sample form
This form is used to illustrate the CForms binding framework. The binding
is based on JXPath and hence works both with XML documents and beans.
Some warnings and limitations of the current implementation:
- the email address is marked in the binding as "read-only", meaning it
will only be bound from bean/xml to form, but not in the other
direction. So you won't see it changed in the bean or the XML.
- The binding doesn't support all widget types yet.
- Note how, in the XML binding, the date is formatted according XML
Schema date format in the XML, while it is displayed in another format
to the user, and is stored in the form model as a Java Date
object (useful for date-specific validations).
If you're running the XML-binding demo, then after successful submit
you'll see the updated XML.
If you're running the bean-binding demo, then after successful submit
you'll be shown a page that uses the JXTemplateGenerator to extract
data from the bean (to show that the bean really has been updated).
Back to Forms samples