Xpage with multiple forms and data sources create empty documents
<ul>
<li>I have a two simple forms (Form1 and Form2). They have only one field
each (field1). I created two custom controls. They are identical except
cc1 has data source defined as Form1  and cc2 has a data source of
Form 2.</li>
<li>Each custom control has one inputbox bound to the field1 field    of
the corresponding data source, and one submit button. I create an<br>
Xpage and pull both custom controls into the page.</li>
<li>If I preview and    fill out the input boxes on the Xpage in a
browser, when I click on    any of the submit buttons, two documents
will be created based on the two forms in the       domino database.</li>
<li>I tried to use partial refresh/execution and lots of other things.
No matter what I do, I always get empty documents of both Forms.</li>
</ul>

<p>XPage:</p>

<pre><code>&lt;xp:div styleClass="container" style="margin-top:20px"&gt;
   &lt;xp:div styleClass="row"&gt;
     &lt;xc:cc1&gt;&lt;/xc:cc1&gt;
     &lt;xc:cc2&gt;&lt;/xc:cc2&gt;
   &lt;/xp:div&gt;
 &lt;/xp:div&gt;
</code></pre>

<p>Custom control 1</p>

<pre><code> &lt;xp:this.data&gt;
    &lt;xp:dominoDocument var="form1" formName="form1"&gt;&lt;/xp:dominoDocument&gt;
  &lt;/xp:this.data&gt;
  &lt;xp:div id="formDiv1" styleClass="col-sm-4"&gt;
    &lt;xp:form&gt;
      &lt;xp:label value="Form 1" styleClass="h3"&gt;&lt;/xp:label&gt;
      &lt;xp:div styleClass="form-group"&gt;
        &lt;xp:label value="Field 1" styleClass="control-label"&gt;&lt;/xp:label&gt;
        &lt;xp:inputText value="#{form1.field1}"&gt;&lt;/xp:inputText&gt;
      &lt;/xp:div&gt;
      &lt;xp:button value="Submit Form1" id="form1Btn"&gt;
        &lt;xp:eventHandler event="onclick" submit="true" refreshMode="partial" immediate="false" save="true" refreshId="formDiv1"
          execMode="partial" execId="formDiv1"&gt;
        &lt;/xp:eventHandler&gt;
      &lt;/xp:button&gt;
    &lt;/xp:form&gt;
</code></pre>

<p></p>

<p>Custom control 2</p>

<pre><code> &lt;xp:this.data&gt;
    &lt;xp:dominoDocument var="form2" formName="form2"&gt;&lt;/xp:dominoDocument&gt;
  &lt;/xp:this.data&gt;
  &lt;xp:div id="formDiv1" styleClass="col-sm-4"&gt;
    &lt;xp:form&gt;
      &lt;xp:label value="Form 2" styleClass="h3"&gt;&lt;/xp:label&gt;
      &lt;xp:div styleClass="form-group"&gt;
        &lt;xp:label value="Field 1" styleClass="control-label"&gt;&lt;/xp:label&gt;
        &lt;xp:inputText value="#{form2.field1}"&gt;&lt;/xp:inputText&gt;
      &lt;/xp:div&gt;
      &lt;xp:button value="Submit Form2" id="form2Btn"&gt;
        &lt;xp:eventHandler event="onclick" submit="true" refreshMode="partial" immediate="false" save="true" refreshId="formDiv1"
          execMode="partial" execId="formDiv1"&gt;
        &lt;/xp:eventHandler&gt;
      &lt;/xp:button&gt;
    &lt;/xp:form&gt;
</code></pre>

<p></p>