Miguel Galves wrote:
Albert,
I wrote the following code to do what you want:
<table>
<logic-el:iterate name="locationForm"
property="tableOffset"
id="offset">
<tr>
<logic-el:iterate name="locationForm" property="areas"
id="area" indexId="counter" offset="${offset}" length="6">
<td>
<b><bean-el:write name="locationForm"
property="areas[${counter}].name"/></b><br>
</td>
</logic-el:iterate>
</tr>
</logic-el:iterate>
</table>
In the inner loop, I use the parameters offset and lenght to define the
initial array position to get the information to be displayed and the
number
of iterations. The only thing I had to do and I really dont like was to
create a tableOffset array in my form, which is an array with all the
offsets I use to build the table, in the outer loop. Its not very
elegant,
but it works fine.
[]s
Miguel
On 5/26/06, Albert L. Sapp <[EMAIL PROTECTED]> wrote:
Hi, everyone.
This code is working.
<c:forEach items="${bannerUnits}" var="unit">
<html:multibox property="selectedUnits">
${unit.unitID}
</html:multibox>
${unit.formattedName}
</c:forEach>
By adding a <br> after the formatted name, I can get each checkbox on a
new line. Not too bad, as we don't have a lot of banner units right
now. I don't like the normal output without the <br>, because the
checkboxs run one right after the other and at the line wrap a box gets
seperated from its label.
What I would like to have is something like this:
[] Unit1 [] Unit2 [] Unit3 ...
.
.
.
[] UnitX [] UnitX+1 ...
I am thinking table, but everything I have tried fails. I can't find
the example I saw on the web from some presentation a person gave and
they didn't give the jsp code anyway. I looked in the mailing archive
and wiki, but either I was not searching right or I am looking for
something not possible.
Can someone give me a yes or no? If yes, can you point me to an example
or drop me the code? Also, is this something that might be in another
tag library? I keep seeing the html-el and struts-el libraries popping
up.
Thanks,
Al
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks for the reply, Miguel.
I am hoping that I can stay with the multibox tab, but this should work
if I need to just create each checkbox individually from an array. I
just like the simplicity of processing the returned array from multibox
versus having to find and process each checkbox. I am assuming that I
would need to check for each possible checkbox name to see if it exists
and process the value returned with it. I may misunderstand the concept
of processing checkboxes in the following action. I will certainly take
a look at this possible solution.
Al
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]