title: Interact with the server side of fields inside a JSF component
body: <p>I'm trying to write a generic method to clear all fields content in a JSF component, in HTML, e.g. a panelGroup. If I have a panel group with fields A, B, C, I wanna per my view find the related fields in the backing bean and set it to null in the server side, Is it possible? For now I have this method: </p>
  
  <pre><code>public String clear(final String parentComponentId) {
      UIViewRoot view = FacesContext.getCurrentInstance().getViewRoot();
      UIComponent fc = view.findComponent(parentComponentId);
      if (null != fc) {
          List&lt;UIComponent&gt; components = fc.getChildren();
          for (UIComponent component : components) {
              if (component instanceof UIInput) {
                  UIInput input = (UIInput) component;
                  input.resetValue();
              }
  
          }
      }
      return null;
  } 
  </code></pre>
  
  <p>But I think that the UIInput.resetValue() does not set the value on the server side... </p>
  
  <p>PS: Just trying to put it more clear, the final goal is to set all components that are not rendered (rendered="false") automatically as null in the backing bean.</p>