public static String findComponentFormId ( FacesContext fc , UIComponent c ) { UIComponent parent = c . getParent ( ) ; while ( parent != null ) { if ( parent instanceof UIForm ) { return parent . getClientId ( fc ) ; } parent = parent . getParent ( ) ; } return null ; }
Finds the Form Id of a component inside a form .