Hey there, I'm facing a minor issue.
The user wants to add some funny text to an input field if a specific condition is met.
For example:
Normal Condition: the input field shows "#{model.user}"
Abnormal condition: the input field should display "#{model.user} SILLY IDIOT". In the abnormal condition, the field is read-only.
Currently, I am rendering two different input fields for different displays, but I'm exploring the possibility of using CSS to append "SILLY IDIOT" to the value.
I tried setting the value to "#{model.user} SILLY IDIOT" but this triggers an error when JSF sets the value to the backing bean. In order to set ReadOnly=true, I had to resort to having two input fields.
I would like to avoid changing the code to keep things simple, so I'm looking for a straightforward CSS solution.