0

Validation UI input element with Viewmodel property

asked 2015-08-17 03:19:10 +0800

redcode1934 gravatar image redcode1934
1

Hi, I have requirement need to completed, I need validate an input field of record on UI with the previous record.

I had created the property(object) in view model which get the previous record, I also read the sample code from the document, it seem validator is focus on UI element validation, I wonder the validator could work with my requirement, does any body know about it?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-19 02:56:12 +0800

JoeHuang gravatar image JoeHuang
1126 2

Hi, You can implement your own validator by extending AbstractValidator, and access the previous record directly in your view model or by passing an argument to the validator.

See more detail at sections: "Implement a Validator" and "Pass and Retrieve Parameters" in the below link. http://books.zkoss.org/zk-mvvm-book/8.0/data_binding/validator.html

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: 2015-08-17 03:19:10 +0800

Seen: 18 times

Last updated: Aug 19 '15

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