-
1. Re: Refresh jsf validator component on rerender
nbelaevski Dec 14, 2010 8:08 PM (in response to stevendegroote)1 of 1 people found this helpfulSteven,
It''s not clear, what mw:validateRange is, but if it's an extension of standard JSF validator, then the problem can be caused by the fact, that validators operate with values and not ValueExpression objects. So, when view is built, expressions are evaluated, and values are persisted in view state until view is rebuilt (e.g. on navigation). As a workaround, invoke validate(...) method inside your bean or implement custom validator that will be using ValueExpression.
-
2. Re: Refresh jsf validator component on rerender
stevendegroote Dec 16, 2010 4:33 PM (in response to nbelaevski)Hi Nick,
thanks for the reply. At least I have some kind of an explanation now.
However, my validator is simply a class RangeValidator implements Validator, Serializable.
If relies on facelets to set the attributes, so I have nothing implemented to handle expressions in the attributes.
I'm still curious about why this is actually a problem. I've been working with JSF for quite a few years now, and I'm still bumping into issues like these, making me realise why newbies and managers have such a problem with the technology
Anyway, I worked around this problem by using f:attribute tags on my component, and I use these in my validator instead of tag attributes.