Hi
Firstly thanks to all those who have contributed to the Velocity Plugin a great enhancement to Servoy.
I have a simple question that may be staring me in the face. In the example its possible to get the records from a foundset and pass these to the plugin. I have attempted to copy this and am getting no joy in either the demo solution or my own efforts. If anyone can see any issues with what I am doing please can you point it out as I have been fiddling with this for a couple of hours
Created a callback script which populates an object
function gmContext() {
plugins.VelocityReport;
var context = new Object();
context.firstRecord = foundset.getSelectedRecord();
var prod = databaseManager.getFoundSet('mydb','clients');
prod.loadAllRecords();
prod.setSelectedIndex(1);
context.prod = prod;
return context;
}
and then passed it to a copy of the template example with in an attempt to insert it into this clip
[code
#foreach($record in $foundset) #endtest$record.idclients | $record.companyname |
Incidentally the foundset contains 200 records and the template does return the header as per Patricks example - so both are working !!
If any one has any points I would be very grateful
Thanks
Gordon