On Wed, Feb 11, 2009 at 12:54 AM, Christian Edward Gruber
<[email protected]> wrote:
> Hey Howard et. al.

Hi!

> <ol t:type="loop" t:source="listItems"
> t:value="${var:(com.foo.bar.blah.MyObject)listItem}">
>        <li>${var:listItem.name}</li>
> </ol>

Notice you end up writing more code than you would using a @Property
and it is way more fragile, as you would need to provide a fully
qualified class name without IDE autocompletion and it is not
refactoring-safe. I don't think it is a good idea.

> In other words, it would explicitly provide a cast-like syntax to allow the
> bytecode manipulation to be instructed with the type.  Now, I'm not 100%
> sure I think this is better than adding a single @Property private MyObject
> listItem in the code, but because this is truly a local variable for this
> iteration, it seems like having an instance variable is not appropriate for
> the purpose.

If you think that the page class and the template are just to
different sides of the same thing (the page) and that the template is
not code, just a text template, having an instance variable is
appropriate. :)

-- 
Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to