Skip to Main Content

Dynamically set required on UI Element

ChristianM0147Jul 27 2021

Hello!
Is there a way to dynamically set the required attribute on a UI component based on another UI Component? I have a <af:inputDate> and a <af:selectBooleanCheckbox> Component and one of those two Components have to have a value. And only one of them may have a value.
The use case is that the user has to enter a date or explicitly say that he doesnt know the date via <af:selectBooleanCheckbox>.
I tried to achieve this using the Expression Builder #{empty bean.bindingDate.value} but it does not work properly.
Any help is appreciated!

This post has been answered by Timo Hahn on Jul 27 2021
Jump to Answer
Comments
Post Details
Added on Jul 27 2021
3 comments
9 views