/** * Override {@link UIComponent#processDecodes} to ensure that the form is decoded * <strong>before</strong> its children. This is necessary to allow the <code>submitted</code> * property to be correctly set. * * @throws NullPointerException {@inheritDoc} */ public void processDecodes(FacesContext context) { if (context == null) { throw new NullPointerException(); } // Process this component itself decode(context); // if we're not the submitted form, don't process children. if (!isSubmitted()) { return; } // Process all facets and children of this component Iterator kids = getFacetsAndChildren(); while (kids.hasNext()) { UIComponent kid = (UIComponent) kids.next(); kid.processDecodes(context); } }