How could I always convert the property username to lower case?
This does not work:
<h:inputText value="#{userService.user.username.toLowerCase()}" />
as target gets “unreachable” by this.
How could I else do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t perform a “set” operation on the given EL expression, while this is mandatory in order to update the model value with the submitted value. The
toLowerCase()method expression doesn’t have a corresponding setter method.Technically, you should be creating a
Converterfor the job. Here’s a kickoff example:Use it as follows:
You should preferably not clutter the model with conversion strategies.