Re: Dynamically setting item appearances
Re: Dynamically setting item appearances
- Subject: Re: Dynamically setting item appearances
- From: mmalcolm crawford <email@hidden>
- Date: Fri, 21 Feb 2003 20:34:55 +0000
On Friday, February 21, 2003, at 03:00 PM, George Domurot wrote:
Ray, you might want to look into using WOComponentContent. You can use
this to create a component that wraps content while designing your
layout within WOBuilder. The nice thing about using this is that it
will mask the underlying workings for your formatting tags, it allow
for re-use of your design scheme and it will allow you to make quick
format changes throughout your application.
Umm, I'd *guess* that WOComponentContent is not really appropriate for
the problem here:
On Thursday, February 20, 2003, at 06:23 PM, Ray Ackland wrote:
I expect there is an (easy?) way to be able to dynamically alter the
appearance of text in a web application. The example is using a
WORepetition on a table, where some elements of the table are going
to be bold.
I'd suggest using WOGenericContainer. Suppose you want to make every
other row bold:
Put all the text in the row inside a WOGenericContainer.
Bind elementName to "b"
Bind omitTags to repetitionIndexEven (a new component method we'll
define in a moment).
In the component, add a variable repetitionIndex.
In the WORepetition, bind index to repetitionIndex.
repetitionIndex will contain the current iteration through the
repetition, hence the component method repetitionIndexEven can be
defined:
public boolean repetitionIndexEven()
{
return (repetitionIndex % 2) == 0;
}
I hope that makes sense?
mmalc
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.