struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bOOyah <boo...@nowhere.org>
Subject Re: How can I display a table in two columns?
Date Tue, 06 Apr 2004 19:47:22 GMT
Axel Stahlhut wrote:

<snip/>

>> Is there a straightforward way to iterate my List so as to render my 
>> table as two columns (four columns really) of 8 rows each?   Like this:
>>
>>     x item-1    x item-9
>>     x item-2    x item-10
>>     . . .       . . .
>>     x item-8    x item-16
> 
> There are a lot of ways to reach what you need, but the following is the 
> nicest, I think:
> 
> <table>
> <logic:iterate: name="myBean" property="listProperty" index="id">
> <tr><td>
>    <html:checkbox name="..." value="<%=whateverValue%>"/>
> </td><td>
>    <html:checkbox name="..." value ="<%=whateverValue+8%>" />
> </td></tr>
> </logic:iterate>
> <table>

Thanks Axel.  That would probably work fine.  My list is always a fixed 
size, but with variable content.

> By the way, what is the submitted value of the cb? Is it the index or 
> some other kind of id?
The multibox values are actually IDs; database primary keys as it happens.

Thanks again!
-- 
bOOyah


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message