This is to show how to highlight input components globally when it is either required, readonly, or disabled.
1. Create a class that is extending the javax.faces.application.ViewHandlerWrapper.
2. Overrider the renderView method.
3. create a private method to find input components recursively and highlight them based on the required, readonly and disabled attribute.
1. Create a class that is extending the javax.faces.application.ViewHandlerWrapper.
public class MyViewHandlerWrapper extends ViewHandlerWrapper {
}
2. Overrider the renderView method.
@Override
public void renderView(FacesContext fc, UIViewRoot view) throws IOException, FacesException {
super.renderView(fc, view);
}
3. create a private method to find input components recursively and highlight them based on the required, readonly and disabled attribute.