-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I have a form with multiple input boxes (the form is used for user registration) and I'm
using the DataBinder. Almost every input box has a "no empty"-constraint.
Now, there's an unwanted behaviour:
1. Enter a value into the first field and lose focus
2. Delete the value again so the field is empty and lose focus -> the constraint triggers correctly
3. Enter a value into the second field and lose focus -> the first input field resets itself to the last validated value and is no longer marked as invalid
I know there are ways to control, when to load, an when to save data. But is it possible, for this special case, to turn off
auto data-loading?
Greetings,
Chris
Constraints are fired during the save-when. The default for databinding save-when is "onChange". So the constraint is fired only "onChange".
Variant 1:
"@{bean.value, save-when=none}"
binder.saveAll() or binder.saveComponent() in the composer/controller
Variant 2:
"@{bean.value, save-when=saveBtn.onClick}"
Variante 3:
"@{bean.value}"
+ bnder.saveAll() or binder.saveComponent() in the composer/controller
Asked: 2011-09-05 02:34:26 +0800
Seen: 176 times
Last updated: Sep 05 '11