-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
i set a WrongValueException to mark textboxes red. But I don't want the errorbox to be displayed. Is that possible?
Regards Andi
Are you using the MVC (composer) or the MVVM (viewmodel) pattern?
If you have access to the components directly, seems easier to just add an sclass to mark the red border? Or do you want that border to disappear after the user focus the component?
If that's the case, then I would do this with an empty custom constraint. A component that holds a custom constraint will not open the error-box popup next to itself when marked as error, and if the constraint is empty, it will not change your workflow.
Alternatively, you could create override classes for the relevant components, and modify the _markError JavaScript functions to not open the popup (which is slightly more effort upfront, but is more practical if you have a lot of instances)
https://zkfiddle.org/sample/2hfjjsf/2-Another-new-ZK-fiddle
"prevent all errorboxes on every components forever on error" override would look like this, but you can use granular override classes (by extending the Textbox, intbox, etc) widget classes and using the w:use="foo.bar.MyCustomTextbox" at component level to use the overidden class instead of the default.
Asked: 2022-01-25 17:36:00 +0800
Seen: 14 times
Last updated: Jan 03