I am using Icefaces 3.2. I would like to know how to reset the styleClass attribute of a component e.g textarea from the backing bean method.
USECASE: I have an ace:textAreaEntry which has a validator method in the backing bean. In this backing bean I am doing some validation. If the validation fails I want a particular CSS class applied to the component. So I want to reset the value of the styleclass attribute.
You can set the
styleClassconditionally ,like thisor assign fail class only and otherwise no class at all
If you manually set message to be displayed in your page you can check if
facesContext.messageListis empty or not, like thisIf you want to test for some specific internal logic validation you can check for some boolean for example
where
someComponentFailedis some property that you set to true/false upon validation failure