ZK MVVM Validation - Dependent Property Array content?

asked 2016-08-26 07:12:55 +0800

FlorianSchaetz gravatar image FlorianSchaetz flag of Germany
31 6

I'm playing around with the ZK 8 MVVM form validation system and generally it seems to do what I want, but I wonder what the definition of the dependent property index is...

Let's take a simple validator...

public class FormValidator extends AbstractValidator {

    public void validate(final ValidationContext ctx) {

        Property[] properties = ctx.getProperties("firstName");

        Object value0 = properties[0].getValue();
        Object value1 = properties[1].getValue();


So, when this is called before the save command, for every property, I get a Property[] array of length 2. But somehow, I have yet to find out what is stored in [0] and what is stored in [1]. Sometimes it seems that [0] stores the current value (which may or may not be valid according the field validator there) and [1] the last valid entry... But sometimes it seems to be the other way round...

The examples in the documentation always seem to simply take the first element ([0]) for validation, but I would like the understand what both parts of this pair actually mean...

Anyone got an idea for that?

delete flag offensive retag edit
Be the first one to answer this question!
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

1 follower



Asked: 2016-08-26 07:12:55 +0800

Seen: 10 times

Last updated: Aug 26 '16

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