0

Do not display errorbox

asked 2022-01-25 17:36:00 +0800

andij62 gravatar image andij62
315 1 7

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

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2022-01-26 17:05:02 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

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.

link publish delete flag offensive edit
0

answered 2022-01-27 00:58:04 +0800

andij62 gravatar image andij62
315 1 7

thanks, exactly what i was looking for

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2022-01-25 17:36:00 +0800

Seen: 14 times

Last updated: Jan 03 '23

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More