protected InputContainerElements scan ( final UIComponent component , InputContainerElements elements , final FacesContext context ) { if ( elements == null ) { elements = new InputContainerElements ( ) ; } // NOTE we need to walk the tree ignoring rendered attribute because it's condition // could be based on what we discover if ( ( elements . getLabel ( ) == null ) && ( component instanceof HtmlOutputLabel ) ) { elements . setLabel ( ( HtmlOutputLabel ) component ) ; } else if ( component instanceof EditableValueHolder ) { elements . registerInput ( ( EditableValueHolder ) component , getDefaultValidator ( context ) , context ) ; } else if ( component instanceof UIMessage ) { elements . registerMessage ( ( UIMessage ) component ) ; } // may need to walk smarter to ensure "element of least suprise" for ( UIComponent child : component . getChildren ( ) ) { scan ( child , elements , context ) ; } return elements ; }
Walk the component tree branch built by the composite component and locate the input container elements .