You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by brian <br...@westpole.com> on 2003/09/16 22:53:39 UTC
problem accessing values from Velocity context
when I try to print the values using:
#foreach($workque in $workques)
<tr>
<td>$workque.wrkq_id</td>
<td>$workque.wrkq_wkgp_id</td>
<td>$workque.wrkq_wrkr_id</td>
</tr>
#end
I get:
$workque.wrkq_id $workque.wrkq_wkgp_id $workque.wrkq_wrkr_id
the values I am trying to access are referring back to the actual
database column names (workque.<COLUMN NAME>). Should I have a
corresponding Workque.java file with methods for getting this info or
can I access the data in this current form?
Brian Allen
Brian Allen
Software Engineer
Westpole,Inc.
(734)995-6390x19
brian@westpole.com
RE: problem accessing values from Velocity context
Posted by Eric Pugh <ep...@upstate.com>.
Look at what your Workque.java class looks like.. If you can display in
java, then you can display in the .vm template.. If you are display
$workque.wrkq_id, then you must have a class with a method: getWorkq_id()
Eric
> -----Original Message-----
> From: brian [mailto:brian@westpole.com]
> Sent: Tuesday, September 16, 2003 10:54 PM
> To: turbine-user@jakarta.apache.org
> Subject: problem accessing values from Velocity context
>
>
> when I try to print the values using:
>
>
>
> #foreach($workque in $workques)
>
>
>
> <tr>
>
>
>
> <td>$workque.wrkq_id</td>
>
>
>
> <td>$workque.wrkq_wkgp_id</td>
>
>
>
> <td>$workque.wrkq_wrkr_id</td>
>
>
>
> </tr>
>
>
>
> #end
>
>
>
>
>
> I get:
>
>
>
> $workque.wrkq_id $workque.wrkq_wkgp_id
> $workque.wrkq_wrkr_id
>
>
>
>
>
>
>
> the values I am trying to access are referring back to the actual
> database column names (workque.<COLUMN NAME>). Should I have a
> corresponding Workque.java file with methods for getting this info or
> can I access the data in this current form?
>
>
>
>
>
>
>
> Brian Allen
>
>
>
>
>
>
>
> Brian Allen
>
> Software Engineer
>
> Westpole,Inc.
>
> (734)995-6390x19
>
> brian@westpole.com
>
>
>
>
RE: problem accessing values from Velocity context
Posted by Eric Pugh <ep...@upstate.com>.
Look at what your Workque.java class looks like.. If you can display in
java, then you can display in the .vm template.. If you are display
$workque.wrkq_id, then you must have a class with a method: getWorkq_id()
Eric
> -----Original Message-----
> From: brian [mailto:brian@westpole.com]
> Sent: Tuesday, September 16, 2003 10:54 PM
> To: turbine-user@jakarta.apache.org
> Subject: problem accessing values from Velocity context
>
>
> when I try to print the values using:
>
>
>
> #foreach($workque in $workques)
>
>
>
> <tr>
>
>
>
> <td>$workque.wrkq_id</td>
>
>
>
> <td>$workque.wrkq_wkgp_id</td>
>
>
>
> <td>$workque.wrkq_wrkr_id</td>
>
>
>
> </tr>
>
>
>
> #end
>
>
>
>
>
> I get:
>
>
>
> $workque.wrkq_id $workque.wrkq_wkgp_id
> $workque.wrkq_wrkr_id
>
>
>
>
>
>
>
> the values I am trying to access are referring back to the actual
> database column names (workque.<COLUMN NAME>). Should I have a
> corresponding Workque.java file with methods for getting this info or
> can I access the data in this current form?
>
>
>
>
>
>
>
> Brian Allen
>
>
>
>
>
>
>
> Brian Allen
>
> Software Engineer
>
> Westpole,Inc.
>
> (734)995-6390x19
>
> brian@westpole.com
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org