How to access component value programmatically
问题 Lets assume I want to access the value of a sibling component in an ActionListener. The following fragment is not working as expected, resulting in a ClassCastException: java.util.HashSet cannot be cast to java.lang.String public void processAction(final ActionEvent event) { FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent sibling = event.getComponent().findComponent("inputText"); String value = (String) sibling.getValue(); ... } If I change the essential part to the