If you want to store a unique index letter for each record then just store the
letter in the database.
If the display always starts on A and is based on the current order, you can
just bind the repetition index to a variable:
ItemRep : WORepetition {
list = items;
item = repItem;
index = itemIndex;
}
and create a string from the index in the java file:
public String indexLetter () {
char c = (char)(65 + itemIndex);
return String.valueOf(c);
}
and bind that into your repetition in the component:
ItemIndex : WOString {
value = indexLetter;
}
Steve
On Apr 24, 2010, at 3:43 PM, Theodore Petrosky wrote:
> I need to add rows to an object listed in a table. My client wants the rows
> labeled A, B, C, etc... So the question is.. how to do this. I thought about
> just numbering the rows in the database (1, 2, 3) then display them by using
> the ASCII number and add the row number.. (ie, I save in the database 1,2,3
> and add 64 then display the resultant ascii character (65 = A, 66 = B, etc)...
>
> Is there an easier way? I get convoluted at times.
>
> Ted
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/speery%40me.com
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]