Hi Sheng, since your are using the BasePeer you get a list of 'com.workingdogs.village.Record' and not Torque Objects. There should be a 'getValue(String s)' function returning a 'com.workingdogs.village.Value'
Cheers, Siegfried Goeschl -----Original Message----- From: Sheng Guo [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:17 PM To: [EMAIL PROTECTED] Subject: Display of the result Hello, I used torque to select 3 columns from 2 tables, the code looks like this: public List getUsers(){ java.util.List list = new ArrayList(); Criteria crit = new Criteria(); crit.addJoin(SYSContactUserPeer.SYS_CONTACT_ID, SYSContactPeer.ID); crit.addSelectColumn(SYSContactUserPeer.FIRSTNAME); crit.addSelectColumn(SYSContactUserPeer.LASTNAME); crit.addSelectColumn(SYSContactPeer.NAME1); crit.addAscendingOrderByColumn(SYSContactUserPeer.ID); try { list = BasePeer.doSelect(crit); return list; } catch (Exception exc) { String message = exc.toString(); System.out.println(message); return null; } } After that I wanted to display the result with Velocity, so: #set ($users = $badgui.getUsers()) //$badgui.getUsers() is a pulltool method I used, to get the result from the Java code <center> #foreach($user in $users) * $user* #end </center> then I got {'Bernadette','Fischer','Bernadette Fischer'} {'Eva','Christoph','Christoph-Consult GbR'} in the browser, after that I tried #set ($users = $badgui.getUsers()) //$badgui.getUsers() is a pulltool I used, to get the result from the Java code <center> #foreach($user in $users) * $user.firstname* #end </center> but I got $user.firstname instead of the first item from each record. How can I get the desired items instead of the variables? Thanks for any advice! yours sincerely Guo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
