private static Boolean _getHonorCurrentComponentAttributes ( FacesContext facesContext ) { // performance note: we cache value in facesContext.attributes because // 1) methods pushComponentToEL, popComponentFromEl, getCurrentComponent a getCurrentCompositeComponent // can use that value // 2) getExternalContext().getInitParameter has undetermined performance. In typical JSF app, there // are one or two wrappers around external context; servletContext.getInitParameter has also unknown // implementation and performance Map < Object , Object > attributes = facesContext . getAttributes ( ) ; Boolean paramValue = ( Boolean ) attributes . get ( HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME ) ; if ( paramValue == null ) { String param = facesContext . getExternalContext ( ) . getInitParameter ( HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME ) ; paramValue = Boolean . valueOf ( ( param != null && Boolean . valueOf ( param ) . booleanValue ( ) ) ) ; attributes . put ( HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME , paramValue ) ; } return paramValue ; }
Gets value of javax . faces . HONOR_CURRENT_COMPONENT_ATTRIBUTES parameter cached in facesContext . attributes or resolves that param and caches its value in facesContext . attributes .