title: how to bind multiple models to a single view in spring web flow?
body: <p><strong>Situation :</strong> I am developing a spring MVC webapp and using spring web flow and tiles framework . I have two tables in DB <code>customer</code> and <code>customerAdress</code> and i have two model classes for them named <code>customerModel</code> and <code>customerAdressModel</code> .</p>
  
  <p>Now in my flow.xml i have the following <code>view-state</code> :</p>
  
  <pre><code>&lt;var name = "cust" class = "com.model.CustomerModel"/&gt; 
  
  &lt;view-state id = "customerViewState" view = "customer" model = "cust"&gt;
  
          &lt;transition on="next" to="customerData"/&gt;
  
      &lt;/view-state&gt;
  </code></pre>
  
  <p>Tile framework resolves the view <code>customer</code> to appropriate <code>customer.jsp</code> which is shown below :</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"     
  pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%&gt;
  &lt;%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%&gt;
  &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"    
  "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div&gt;
  &lt;form id="Form" method="post" enctype="multipart/form-data" class="form-   
  inline"&gt;    
      &lt;div class="inputDiv"&gt;
  
              &lt;label class="inputLabel"&gt; Name :&lt;/label&gt;
              &lt;input type="text" name="name" id="name"&gt;           
  
  
  
              &lt;label class="inputLabel"&gt;Email :&lt;/label&gt;
              &lt;input type="email" name="email" id="email"&gt;
  
      &lt;/div&gt;              
      &lt;input type="button" id="forwardButton" value="Next"/&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;script&gt;
  
  $("#forwardButton").click(function(){
  
  $("#WlDetailsForm").attr('action','${flowExecutionUrl}&amp;_eventId=next');
      $("#WlDetailsForm").submit();
  
  });
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Problem :</strong> Now the form specified in <code>customer.jsp</code> has some input fields that contains value of properties of <code>customerAdressModel</code> .Thus i want to bind <code>customerModel</code> as well as <code>customerAdressModel</code> to the same view state <code>customerViewState</code>. How do i do that , i went through spring DOC but couldnt find anything , please help ! </p>
  
  <p><strong>Note :</strong> i cant modify my sql tables</p>