Find UIComponents of a JSF view in bean

You can get the component tree by FacesContext#getViewRoot() and find a particular component by ID by UIComponentBase#findComponent():

UIViewRoot viewRoot = FacesContext.getCurrentInstance().getViewRoot(); UIComponent component = viewRoot.findComponent("someId");


Popular posts from this blog

Check MySQL query history from command line

Installing chocolatey on Windows

Fixed: ImportError: No module named