cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Cummings <>
Subject [2.1m2][xmlform][schematron] model-bean properties of primitive types
Date Thu, 17 Jul 2003 18:25:14 GMT

I have a quick question about how to deal with primitive-typed properties in
xmlform and schematron. I cannot get my assertion message for primitive fields
to show on the form after pressing the "Next" button (I'm using flowscript to
implement a form-wizard, just like the example from the xmlform block). Instead
I get the exception message about number formatting. I understand that the
xmlform framework would like to try to save the user-input value while showing
the error message so that they can change or correct it, but this obviously
won't work when the value can't be saved at all. 

Is there a way to have xmlform check your assertions *before* saving the
erroneous value? Is it possible to tell it to use a default value in case of
such an error and to display nothing in case of that default value?

The next best thing I can think of is to write a proxy object whose properties
corresponding to the primitives of the original object are strings such that
the user can do input, see validation errors, and THEN have the flowscript
persist the proxied values into the real object. I wanted to see if there was a
better way without having to write so much extra code for each model-bean.



Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message