Validations of non-input fields

asked 2010-03-26 08:07:07 +0800

raevel2 gravatar image raevel2
72 1 2

I have a macro component for doing file uploads, and I want to be able to trigger validation errors if no file is uploaded.
I trigger validation errors using myConstraint.validate(button, value).

How can I close the error dialog once it is opened?

Every time validate is called a new popup is shown. According to http://sourceforge.net/tracker/index.php?func=detail&aid=2970695&group_id=152762&atid=785191 this is supposed to work like this, but as you can see by my comment there this behavior is only applied to non-input fields (that is, input fields can only have one dialog, other fields can have arbitrarily many). Can this be prevented? If I can close the old window somehow that will solve the problem since I can just close it before i call validate again.


delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-03-30 04:28:59 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Could you test with the latest ZK 5.0.1 version?
In my environment, the two buttons of "Fail on text field" and "Fail on button" did the same result for me.

link publish delete flag offensive edit

answered 2010-04-06 07:53:37 +0800

raevel2 gravatar image raevel2
72 1 2

Ah, that solved the problem. I thought we were using 5.0.1, but it turned out we were still on 5.0.0. Thank you.

My other question still remains, though how can I close an error dialog programmatically?

link publish delete flag offensive edit

answered 2010-04-08 06:05:58 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi raevel,
try Clients.clearWrongValue(). Javadoc here.

- Ashish

link publish delete flag offensive edit
Your reply
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




Asked: 2010-03-26 08:07:07 +0800

Seen: 306 times

Last updated: Apr 08 '10

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