How to fetch multiple field values before save of the form?

I want to fetch different form field values before hitting the save button, so that i can do some validations. I know that we can bind a Validator to a form field, but how can i get different form field values in this validator method?

ie. i have Two fields Field A and Field B. My validator is bound to Field B. How can i fetch the entered value of Field A in field B's validator? Field B's validation is done based on the field A's value.

Thanks, Ansel

0 votes

1 answers

2482 views

ANSWER



This can be achieved by using a widget template that will retrieve values from both components, and perform the cross validation: http://www.nuxeo.com/blog/development/2009/03/cross-validation-with-jsf/

0 votes



The issue that i am facing is that the field is not a text widget but an multivalued vocabulary. How can i fetch the First level value of this vocabulary so that i can go ahead with the validation.Similarly how to fetch Complex multivalued fields value in the same template?
12/12/2012