On 2000.12.05 23:38:22 +0000 "Diethelm Guallar, Gonzalo" wrote:
> 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.

Yes, I can see that being useful, something like:

#foreach $field in $selectedFields
<td>$object.getFieldByName($field)</td>
#end

> 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.

It should be trivial to add to the Object.vm torque template to generate a
getFieldByName method. Whether this would be wanted in the general case is
another matter... (I guess I'm +0 on patching Object.vm this way)

-- 
Sean Legassick
[EMAIL PROTECTED]
      Soy un hombre: nada humano me es extrano  
      
      


------------------------------------------------------------
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