@Override
    public void encodeBegin(FacesContext context) throws IOException {

        preEncode(context);
        super.encodeBegin(context);

    }
<p>In addition to the default behavior, ensure that any saved per-row
state for our child input components is discarded unless it is needed to
rerender the current page with errors.

@param context FacesContext for the current request

@throws IOException          if an input/output error occurs while
                             rendering
@throws NullPointerException if <code>context</code> is <code>null</code>
primefaces/src/main/java/org/primefaces/component/patch/UIDataPatch.java