JSTL Help Again
[nobr]This is what the below code is printing out.
List(1) item (1)
List(2) item (1)
List(2) item (2)
List(1) item (2)
List(2) item (1)
List(2) item (2)
But I want it to print out like so:
List(1) item (1)
List(2) item (1)
List(1) item (2)
List(2) item (2)
--
I have tried many different ways to do this but just cant get it working properly. I would appreciate any help and/or direction.
Thanks in advance.
<c:forEach var="impact" items="${displayImpact.impactList}" varStatus="status">
<c:forEach var="impactKeys" items="${impact}" varStatus="status">
<tr>
<td class="reportTable" valign="top" align="center" colspan="6">Quality Owner Acknowlegement - <c:out value="${status.count}"/></td>
</tr>
<c:forEach var="impactValue" items="${impactKeys.value}" varStatus="s">
<c:choose>
<c:when test="${(s.count == 1)}">
<tr>
<c:choose>
<c:when test='${(impactValue) == "military"}'>
<td valign="top" colspan="2"><input type="radio" NAME="impactClass<c:out value="${status.count}"/>" VALUE="military" checked readonly>Military</td>
</c:when>
<c:otherwise>
<td valign="top" colspan="2"><input type="radio" NAME="impactClass<c:out value="${status.count}"/>" VALUE="military" readonly disabled>Military</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test='${(impactValue) == "commercial"}'>
<td valign="top" colspan="2"><input type="radio" NAME="impactClass<c:out value="${status.count}"/>" VALUE="commercial" checked readonly>Commercial</td>
</c:when>
<c:otherwise>
<td valign="top" colspan="2"><input type="radio" NAME="impactClass<c:out value="${status.count}"/>" VALUE="commercial" readonly disabled>Commercial</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test='${(impactValue) == "common"}'>
<td valign="top" colspan="2"><input type="radio" NAME="impactClass<c:out value="${status.count}"/>" VALUE="common" checked readonly>Common</td>
</c:when>
<c:otherwise>
<td valign="top" colspan="2"><input type="radio" NAME="impactClass<c:out value="${status.count}"/>" VALUE="common" readonly disabled>Common</td>
</c:otherwise>
</c:choose>
</tr>
</c:when>
<c:when test="${(s.count == 2)}">
<tr>
<c:choose>
<c:when test='${(impactValue) == "no"}'>
<td valign="top" colspan="3"><input type="radio" NAME="impactAffect<c:out value="${status.count}"/>" VALUE="no" checked readonly>The condition of the measuring Equipment has been determined to NOT have an adverse affect on any engineering/production component.</td>
</c:when>
<c:otherwise>
<td valign="top" colspan="3"><input type="radio" NAME="impactAffect<c:out value="${status.count}"/>" VALUE="no" disabled>The condition of the measuring Equipment has been determined to NOT have an adverse affect on any engineering/production component.</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test='${(impactValue) == "yes"}'>
<td valign="top" colspan="3"><input type="radio" NAME="impactAffect" VALUE="yes" checked readonly>The conditions of the Measuring Equipment has been determined to HAVE AN ADVERSE AFFECT on engineering/production component.</td>
</c:when>
<c:otherwise>
<td valign="top" colspan="3"><input type="radio" NAME="impactAffect" VALUE="yes" disabled>The conditions of the Measuring Equipment has been determined to HAVE AN ADVERSE AFFECT on engineering/production component.</td>
</c:otherwise>
</c:choose>
</tr>
</c:when>
<c:when test="${(s.count == 3)}">
<tr>
<td valign="top"><a href>Comments:</a></td>
<td valign="top" colspan="5"><TEXTAREA NAME="comment" ROWS=5 COLS=75% readonly><c:out value='${impactValue}'/></TEXTAREA>?lt;/td>
</tr>
</c:when>
<c:when test="${(s.count == 4)}">
<tr>
<td valign="top"><a href>Recommendationfor Tool:</a></td>
<td valign="top" colspan="5"><span class="reportInstruction">* Without further instruction tool will be repaired and returned to production.</span>
<br><TEXTAREA NAME="comment" ROWS=5 COLS=75% readonly><c:out value='${impactValue}'/></TEXTAREA>?lt;/td>
</tr>
</c:when>
<c:when test="${(s.count == 5)}">
<tr>
<td valign="top"><a href>Acknowledged by:</a></td>
<td valign="top" colspan="2"><c:out value="${impactEmail.impactFirst}"/>?lt;c:out value="${impactEmail.impactLast}"/><%//<c:out value='${impactValue}'/>%>?lt;/td>
</c:when>
<c:when test="${(s.count == 6)}">
<td valign="top"><a href>Date:</a></td>
<td valign="top" colspan="2"><c:out value='${impactValue}'/>?lt;/td>
</tr>
</c:when>
</c:choose>
</c:forEach>
<c:forEach var="quality" items="${displayQuality.qualityList}" varStatus="status">
<c:forEach var="qualityKeys" items="${quality}" varStatus="status">
<tr>
<td class="reportTable" valign="top" align="center" colspan="6"> Quality Team Rep Review</td>
</tr>
<c:forEach var="qualityValue" items="${qualityKeys.value}" varStatus="s">
<c:choose>
<c:when test="${(s.count == 1)}">
<tr>
<td valign="top"><a href>Findings:</a></td>
<td valign="top" colspan="5">
<c:choose>
<c:when test='${(qualityValue) == "yes"}'>
<input type="radio" NAME="qualityFindings<c:out value="${status.count}"/>" VALUE="yes" checked readonly>Accept Findings<br>
</c:when>
<c:otherwise>
<input type="radio" NAME="qualityFindings<c:out value="${status.count}"/>" VALUE="yes" disabled>Accept Findings<br>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test='${(qualityValue) == "no"}'>
<input type="radio" NAME="qualityFindings" VALUE="no" checked readonly>Reject Findings<br>
</c:when>
<c:otherwise>
<input type="radio" NAME="qualityFindings" VALUE="no" disabled>Reject Findings<br>
</c:otherwise>
</c:choose>
</tr>
</c:when>
<c:when test="${(s.count == 2)}">
<tr>
<td valign="top"><a href>Comments:</a></td>
<td valign="top" colspan="5"><TEXTAREA NAME="qualityComments" ROWS=5 COLS=75% readonly><c:out value='${qualityValue}'/></TEXTAREA></td>
</tr>
</c:when>
<c:when test="${(s.count == 3)}">
<tr>
<td valign="top"><a href>Reviewed By:</a></td>
<td valign="top" colspan="2"><c:out value="${qualityEmail.qualityFirst}"/>?lt;c:out value="${qualityEmail.qualityLast}"/></td>
</c:when>
<c:when test="${(s.count == 4)}">
<td valign="top"><a href>Date:</a></td>
<td valign="top" colspan="2"><c:out value='${qualityValue}'/>?lt;/td>
</tr>
</c:when>
</c:choose>
</c:forEach>
</c:forEach>
</c:forEach>
</c:forEach>
</c:forEach>
[/nobr]

