Hi: Steven Cummings dijo: > Hello, > > 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.
XMLForm are currently being merged with JXForm: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105775885025780&w=2 But take it easily, since the are very similars. :) > > 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? > It depends how you are saving. But is you are using flow, then you can check the returned values from the form *before* saving. If there is and error you can go back. A new forms framework is emerging, his name is woody. It allow to do automatically this kind of things. I also think JXForms allow to do that, but I dont know it deeply. > 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. Yes, woody do that. If you are very interested in this I invite you to follow the current dicusion in the devel maillist. Best Regards, Antonio Gallardo. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
