--- In [email protected], Adrian Williams <[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
>     Thanks for the info!  The outerDocument.methodName worked 
perfectly 
> and the link that was provided was excellent.
> 
>     Quick question Amy, forgive my nubeness, what do you mean by "Why 
> not make this a method on the VO that you're using for your data 
property?"

Let's assume your dataProvider is an ArrayCollection, and you're using 
custom Value Objects (VO's) that are strongly typed.  Then you can set 
up something like this:

public function get emailHref():String{
   return '<a href="mailto:' + _eMailAddress + + '</a>';
}

_eMailAddress would be the private variable you populated in a setter 
or the object's constructor.  If you do it this way, you can act like 
your VO (data) actually has an emailHref property.  Then you don't need 
a custom itemrenderer at all--you can just tell it what the dataField 
is--and your project will compile smaller.

You may also find that a labelFunction will accomplish the same thing 
without enforcing tight coupling or changing whatever you're using as 
your data source.  It's considered bad practice to reach out of the 
renderer scope like that, though it may not matter much with an inline 
renderer.

HTH;

Amy

Reply via email to