Is there a property in class MyForm named "columns"?
It's in the base class that MyForm extends.

Can you post the block using tags and the error?

I got it working, although it is not what I would think of as elegant.
here:
<c:set var="row" value="0"/>
<c:forEach var="foo" items="${candidateSearchForm.candidateColumns}" step="7">
<tr>
<c:forEach var="cell" begin="${7*row}" end="${7*row+6}" step="1">
<td align="left" valign="top">
<c:if test="${!empty candidateSearchForm.candidateColumns[cell]}">
<html-el:multibox property="selectedColumns" value="${candidateSearchForm.candidateColumns[cell]}"/>
</c:if>
</td>
<td align="left" valign="top">
<c:if test="${!empty candidateSearchForm.candidateColumns[cell]}">
<c:out value="${candidateSearchForm.candidateColumns[cell]}"/>
</c:if>
</td>
</c:forEach>
</tr>
<c:set var="row" value="${row + 1}"/>
</c:forEach>


I wish I had a solution that didn't need the !empty test, or the "row = row + 1" bit.





Matthew Van Horn wrote:

How do I access the form bean properties from my jsp page?

I have a property called columns which is a String[] array.
I'd like to do the equivalent of the following using tags.

<%
String[] myArray = myForm.getColumns();
for (int i=0; i < myArray.length; i = i+7) {
    out.print("<TR>");
    for (int j=0; j < 7; j++) {
        out.print("<TD>"+ myArray[(i*7)+j] +"</TD>");
    }
    out.print("</TR>");
}
%>

I tried this (saw it online) -  but I get an error about accessing the
columns property.

<c:forEach var="row" begin="0" items="${myForm.columns}" step="7">

If it matters, columns is inherited from a BaseForm class.

Thanks for helping,
Matt




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to