Dear All
We aere trying to add some 'error style' for the erroneous form fields using PhasesListener. Everything works well. But when I tried adding the style for error input fields which are part of rich:dataTable, the findComponent returns null. Code sample is given below
Iterator<String> clientIdsWithMessages = facesContext .getClientIdsWithMessages(); UIViewRoot uiViewRoot = facesContext.getViewRoot(); while (clientIdsWithMessages.hasNext()) { String clientIdWithMessages = clientIdsWithMessages.next(); if( clientIdWithMessages== null){ continue; //Any chance for this to happen? } UIComponent uicomp = uiViewRoot.findComponent (clientIdWithMessages); if(uicomp==null){ //Should not happen , right? } }
This link seems promising in this context
http://weblogs.java.net/blog/jhook/archive/2006/02/new_feature_for.html
Would like to know expert opinion on this as well...