title: Spring web flow dynamic JSP/Form issues
body: <p>my site is an insurance related site, so after the driver enters the drivers and the vehicles, they would proceed to the coverages page - this page would list each vehicle next to each coverage allowing them to choose which coverage for which vehicle. The problem is it keeps blowing up on this and I have no idea why. Here is the portion of the JSP that is blowing up. Here is coverages.jsp</p>
  
  <pre><code>&lt;spring:bind path="quoteForm.${fn:toLowerCase(vehicleCoverageList.coverageCode)}[${vehicleIndex}]" &gt;
  &lt;select name="${status.expression}" class="violationType" id="${vehicleCoverageList.coverageCode}"  validate="selectOneOption" req=""&gt;
      &lt;c:if test="${vehicleCoverageList.isRequired == 'N'}"&gt;
          &lt;option value="-1"&gt;&lt;spring:message code="coverage.decline" /&gt;&lt;/option&gt;
      &lt;/c:if&gt;
      &lt;c:forEach var="vehicleCoverage" items="${vehicleCoverageList.limits}"&gt;
          &lt;option value="${vehicleCoverage.id}" &lt;c:if test="${vehicleCoverage == 'TODO'}"&gt;SELECTED&lt;/c:if&gt;&gt;
              ${vehicleCoverage.coverageLimits}
              &lt;c:if test="${not empty vehicleCoverage.deductible}"&gt;
                  &lt;spring:message code="coverage.deductible" /&gt;${vehicleCoverage.deductible}
              &lt;/c:if&gt;
          &lt;/option&gt;
      &lt;/c:forEach&gt;
  &lt;/select&gt;
  &lt;/spring:bind&gt;
  </code></pre>
  
  <p>I was trying to follow the advice given here: <a href="http://mattfleming.com/node/134" rel="nofollow">http://mattfleming.com/node/134</a></p>
  
  <p>The form:</p>
  
  <pre><code>public class QuoteForm extends AbstractRTRForm implements Serializable {
      private List&lt;CoverageCodeWrapper&gt; accdth = new ArrayList&lt;CoverageCodeWrapper&gt;();// = LazyList.decorate(new ArrayList&lt;CoverageCodeWrapper&gt;(), FactoryUtils.instantiateFactory(CoverageCodeWrapper.class));
  private List&lt;CoverageCodeWrapper&gt; addeq  = new ArrayList&lt;CoverageCodeWrapper&gt;();// = LazyList.decorate(new ArrayList&lt;CoverageCodeWrapper&gt;(), FactoryUtils.instantiateFactory(CoverageCodeWrapper.class));
   ...
  }
  </code></pre>
  
  <p>There is more but I cut it out for simplicity's sake. </p>
  
  <p>The FormAction:</p>
  
  <pre><code>@Override
  protected Event finishSetupForm(RequestContext context) throws Exception {
      form.getQuoteForm().setAccdth( this.getWrapper() );
      form.getQuoteForm().setAddeq ( this.getWrapper() );
      ...
  }
  private List&lt;CoverageCodeWrapper&gt; getWrapper() {
      CoverageCodeWrapper c = new CoverageCodeWrapper();
      List&lt;CoverageCodeWrapper&gt; list = new ArrayList&lt;CoverageCodeWrapper&gt;();
  
      list.add( c );
  
      return list;
  }
  </code></pre>
  
  <p>The error is not very helpful, but I'll give it:</p>
  
  <p>org.apache.tiles.TilesException: JSPException while including path '/WEB-INF/tiles/coverages.jsp'. ServletException while including page.</p>
  
  <p>My goal is to have the users just choose all of the coverages for all of the vehicles on one page vs have to navigage through as many pages as there are vehicles. The form uses Lists as the number of vehicles the user can enter is variable.</p>
  
  <p>Any help would be greatly appreciated, thank-you
  Jerry</p>