Re: How to generate a table row twice over the same range of items
Re: How to generate a table row twice over the same range of items
- Subject: Re: How to generate a table row twice over the same range of items
- From: John Clayton <email@hidden>
- Date: Sat, 26 Mar 2005 14:58:07 -0500
Well, here's a more detailed explanation, and please tell me if this is
the completely wrong approach:
My pseudo markup looks like this:
<table>
<tr>
<webobject name="MyItemsRepetition">
<td>thisItem.img</td>
<webobject name="NewRowAfterFiveCellsCondition">
</tr><tr>
<!-- Here's where I need to loop over same five items as above to
create a new row-->
<webobject name="MyItemsRepetitionRowTwo">
<td>thisItem.someOtherProp</td>
<!-- stop after five! -->
</tr><tr>
</webobject
</webobject>
</webobject>
</tr>
</table>
Where the output I'm hoping for is like this:
<table>
<tr>
<td>items[0].img</td>
<td>items[1].img</td>
<td>items[2].img</td>
<td>items[3].img</td>
<td>items[4].img</td>
</tr>
<tr>
<td>items[0].someOtherProp</td>
<td>items[1].someOtherProp</td>
<td>items[2].someOtherProp</td>
<td>items[3].someOtherProp</td>
<td>items[4].someOtherProp</td>
</tr>
<tr>
<td>items[5].img</td>
<td>items[6].img</td>
<td>items[7].img</td>
<td>items[8].img</td>
<td>items[9].img</td>
</tr>
<tr>
<td>items[5].someOtherProp</td>
<td>items[6].someOtherProp</td>
<td>items[7].someOtherProp</td>
<td>items[8].someOtherProp</td>
<td>items[9].someOtherProp</td>
</tr>
</table>
-John
On Mar 26, 2005, at 2:25 PM, Arturo Pérez wrote:
Why can't you write both cells on the first pass through the
repetition?
If you're using WebObjects Builder then you'll have to go into HTML
view.
-arturo
On Mar 26, 2005, at 2:13 PM, John Clayton wrote:
Hi,
I can't seem to get myself out of this whole:
I am displaying a group of items in table rows in a table with five
columns. Each item takes two cells to display, in parallel rows,
like this:
table>
tr>
td> itemone.prop1 td>itemtwo.prop1 ...
tr>
td> itemone.prop2 td> imtemtwo.prop2
.
.
.
<table
The reason for this is so that each cell in the same row is tall as
the tallest item, which isn't know ahead of time.
I sure know how to use a WORepetition to repeat a row, but what
about backing up to the beginning of the same range and doing it
again, displaying different properties of each object?
If you understand what I'm trying to say and can help, Thanks!
—John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden