> >    #foreach ($info in $infos)
> >     <tr>
> >      <td>$info.getCode()</td>
> >      <td>$info.getFullName()</td>
> >    #end
> 
> BTW, why not:
> 
> <td>$info.Code</td>
> <td>$info.FullName</td>

Yeah, that works too, I just don't like the Bean
way of accessing properties.

> >    #foreach ($info in $infos)
> >     <tr>
> >      <td>$info.getFieldByName("code")</td>
> >      <td>$info.getFieldByName("fullName")</td>
> >    #end
> >  
> >  Is this possible with the current peer model? Or maybe as a
> >  Velocity "hack"? In any case, how? If not possible at present,
> >  would you think it a worthwhile addition? If yes, I would be
> >  more than happy to implement this, but I would need some gentle
> >  guidance to get me started...
> 
> Can you tell why exactly you need this and how you want to 
> use it in a way you can't currently do?

I want to allow the users (and Velocity programmers) to choose in
a different way what columns they want to show. A typical example
would be a form where you can specify what fields you want to see
back from a query, and then have the template showing the query
results just show those fields. I know I could do this with other
mechanisms, but I think it could be useful to be able to specify
fields by name.

Also, I have other data services that return a bunch of fields,
and that don't have torque-like generated classes with all the get*()
methods. Therefore, for these data services, there will be a
getFieldByName() method. I would like to be able to provide the
same access method for SQL-based data services.

> fedor.


-- 
Gonzalo A. Diethelm
[EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to