Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.5
-
Fix Version/s: 0.6
-
Component/s: yfaces-core
-
Labels:None
-
Number of attachments :
Description
Currently YComponent#validate just returns void.
Validation can be improved in following ways:
- YComponent#validate returns boolean
-> true : validation successfull, proceed as usual
-> false: validation fails; don't render component
or - YComponent#validate returns void but method body may call YComponent#setValidationState(...) for an enhanced validation (error) result
- YComponent#validate throws an exception
-> don'r render component; log exception (console) but don't show it in browser
Validation is very low level and only assures, that while rendering the component no exception is thrown/visible at browser.
For a more accurate validation handling each component has to implement it and each component view has to evaluate it.
Issue Links
- duplicates
-
YFACES-23
support component validation errors
-
HtmlYComponent either renderes YComponent as expected or, when component returns an illegalComponentState, delegates to an internal renderer which just prints the illegalstate message but without break the rendering process of the whole UiViewroot.
An illegalComponentState can be set manually within: YComponent#validate(), YComponent#refresh or within any component setter which gets invoked before validate.
An illegalcomponentstate is set automatically whenever an uncaught exception within the above methods is thrown.