I have a <h:outputText>
in the view.
In the controller, I would like to use below code to manipulate the value
and style
attributes. Is it possible?
private void updateMsgCreateRegistrationKey(String objectName, String msg, String msgType){
UIComponent UIOutputText = getUIComponentOfId(FacesContext.getCurrentInstance().getViewRoot(), objectName);
if (UIOutputText != null){
UIOutputText.setRendered(true);
if(msgType.equalsIgnoreCase("Info")){
}else if(msgType.equalsIgnoreCase("Error")){
}
}
RequestContext.getCurrentInstance().update(objectName);
FacesContext.getCurrentInstance().renderResponse();
}