title: ajax changes target attribute on multipart/form-data form
body: <p>When I try to render a component with f:ajax inside a <strong>multipart/form-data</strong> form, the <strong>target</strong> attribute of the form gets changed to <strong>JSFFrameId</strong>. Is this a bug?</p>
  
  <p>Here is a sample code when this occur:</p>
  
  <pre><code>&lt;h:form enctype="multipart/form-data"&gt;
      &lt;h:inputText&gt;
          &lt;f:ajax event="change" render="@this" execute="@this"/&gt;
      &lt;/h:inputText&gt;
      &lt;h:inputFile /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>In my real code this is not what I'm trying to do but the same issue occurs with the sample code.</p>
  
  <p>When visiting this page I get the following HTML output:</p>
  
  <pre><code>&lt;form id="form" name="form" method="post" action="/AdApp/faces/test.xhtml" enctype="multipart/form-data"&gt;
      &lt;input type="hidden" name="form" value="form"&gt;
      &lt;input id="form-textfield" type="text" name="form-textfield" onchange="mojarra.ab(this,event,'change','@this','@this')"&gt;
      &lt;input id="form-filefield" type="file" name="form-filefield"&gt;
      &lt;input type="hidden" name="javax.faces.ViewState" id="j_id1-javax.faces.ViewState-0" value="-1920816151200438245:-3719618601043085373" autocomplete="off"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Nothing wrong here. But when the ajax event triggers, this is what happends with the HTML output(My issue? target attribute of the form):</p>
  
  <pre><code>&lt;form id="form" name="form" target="JSFFrameId" method="POST" action="http://DOMAIN_PATH/AdApp/faces/test.xhtml" enctype="multipart/form-data"&gt;
      &lt;input type="hidden" name="form" value="form"&gt;
      &lt;input id="form-textfield" type="text" name="form-textfield" onchange="mojarra.ab(this,event,'change','@this','@this')"&gt;
      &lt;input id="form-filefield" type="file" name="form-filefield"&gt;
      &lt;input type="hidden" name="javax.faces.ViewState" id="j_id1-javax.faces.ViewState-0" value="-1920816151200438245:-3719618601043085373" autocomplete="off"&gt;
  &lt;/form&gt;
  &lt;iframe src="about:blank" id="JSFFrameId" name="JSFFrameId" width="0" height="0" frameborder="0"&gt;
      &lt;partial-response id="j_id1"&gt;
          &lt;changes&gt;
              &lt;update id="form-textfield"&gt;
                  &lt;![CDATA[&lt;input id="form-textfield" type="text" name="form-textfield" value="das" onchange="mojarra.ab(this,event,'change','@this','@this')" /&gt;]]&gt;
              &lt;/update&gt;
              &lt;update id="j_id1-javax.faces.ViewState-0"&gt;
                  &lt;![CDATA[-1920816151200438245:-3719618601043085373]]&gt;
              &lt;/update&gt;
          &lt;/changes&gt;
      &lt;/partial-response&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>I don't care about the iframe keeping a record of the changes. My issue is that the target of the form has been changed. So after the ajax event triggers, a submit will target a hidden iframe and not the window itself. </p>
  
  <p>If I remove the <strong>enctype</strong> attribute or set ajax to render <strong>@form</strong> instead, it doesn't change the <strong>target</strong> attribute. I need the <strong>enctype="multipart/form-data"</strong> to upload files, and I dont want to use <strong>render="@form"</strong> because some of the content in my real form might have been modified by javascript code. Am I missing something? Or just bug? I will add some javascript to remove the target attribute but if I'm doing something wrong, I should use another approach.</p>
  
  <p>I'm using the following tools:</p>
  
  <p>Netbeans IDE 8</p>
  
  <p>Glassfish 4 with Mojarra 2.2.7</p>