Hi,

I am using tdk1.1a9, and velocity.

I met one problem:

For example: I have a Vector  results,   and send it to context by:
context.put("results", results);

In vm, I write:

#foreach ($result in $results)
    <tr>
        <td>$result.getName()</td>
        <td>$result.getValue()</td>
    </tr>
#end

When result contains value, it works fine.  But when result do not contains
value (for example, it do not find a record in database), the system will
give out an error:

Error=An error occurred while rendering template /screens/Content.vm:
null


I put a check before #foreach:

#if($results.size() > 0)
    #foreach  .......

#end

The system still gives out the same error.


Anyone met this kind of problem?



Regards


fanyun














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