Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I am working with JSF 2.3 and have a selectManyMenu component that is marked as required but that I want to be cleared if the user unselects all items. Currently, the user can unselect all items, b...
#5: Post edited
Clear selectManyMenu component if user unselects item in JSF 2
I am working with JSF 2.3 and have a `selectManyMenu` component that is marked as `required` but that I want to be cleared if the user unselects all items. Currently, the user can unselect all items, but the backing bean will still have the last selected item retained. This causes the UI to not reflect what will actually get stored in the database. How can I get the UI to reflect that the user has deselected all items without removing the `required` attribute?
#2: Post edited
Clear menu if user unselects item in JSF 2
- Clear selectManyMenu component if user unselects item in JSF 2
#1: Initial revision
Clear menu if user unselects item in JSF 2
I am working with JSF 2.3 and have a `selectManyMenu` component that is marked as `required` but that I want to be cleared if the user unselects all items. Currently, the user can unselect all items, but the backing bean will still have the last selected item retained. This causes the UI to not reflect what will actually get stored in the database. How can I get the UI to reflect that the user has deselected all items without removing the `required` attribute?