Re: Strangeness afoot
Re: Strangeness afoot
- Subject: Re: Strangeness afoot
- From: Lachlan Deck <email@hidden>
- Date: Fri, 26 Oct 2007 13:32:09 +1000
On 26/10/2007, at 1:04 PM, Kevin Windham wrote:
On Oct 25, 2007, at 8:36 PM, Lachlan Deck wrote:
Ahh... perhaps I spoke too soon :-) Sounds like you're making it
too hard anyway. If you have something like the following life
will be easy...
ColsRepetition : WORepetition {
list = recordsPerColumn;
item = rowsForColumn;
index = columnIndex;
}
RowsRepetition : WORepetition {
list = rowsForColumn;
item = rowItem;
index = rowIndex;
}
WORepetition will increment columnIndex and rowIndex for you.
Are you saying I should be able to make the columns repetitions too?
That's an option. If not, then you can increment columnIndex like so:
private int colIndex = 0;
private int rowIndex = 0;
public int colIndex() { return this.colIndex; }
public int rowIndex() { return this.rowIndex; }
public void setRowIndex( int num )
{
this.rowIndex = num;
if ( rowIndex() == 0 )
this.columnIndex = 0;
else if ( rowIndex() % COLS_PER_ROW == 0 )
this.columnIndex++;
}
public String cbName()
{
return "r" + (rowIndex() + 1) + "c" + (colIndex() + 1);
}
What about the headers in the table? Actually I'm not sure this
will work anyway since I also have some cells that are conditional
and show other contents at times.
WOConditional's inside WORepetitions are allowed :-)
with regards,
--
Lachlan Deck
_______________________________________________
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