Hi, I am just wondering how to access the instance field of my class in
velocity template. Here is the description of the problem:
I have a user defined class as follows:
package org.apache.jetspeed.modules.actions.portlets;
import java.util.*;
public class Feedback
{
public String fname;
public String fcomment;
public String fbug;
public Feedback(String fn, String fc, String fb)
{
this.fname = fn;
this.fcomment = fc;
this.fbug = fb;
}
}
I add this class to a list vector which I put into the context
eventually. All goes fine unitl this.
But, when I use following velocity template, I don't see my values. I
found that $fbk has this:
[EMAIL PROTECTED]
<table>
<tr>
<td>
<table border="true" cellspacing="1" cellpadding="3">
<tr>
#foreach ($fhdr in ["Name","Comment","Bug"])
#headerCell ($fhdr)
#end
</tr>
#foreach ($fbk in $feedbacks)
<tr>
<td>$fbk.fname</td>
<td>$fbk.fcomment</td>
<td>$fbk.fbug</td>
</tr>
#end
</table>
</td>
</tr>
</table>
I am sure, I am missing something very basic and key concept here. Any
help will be very useful.
_________________________
Manish Kumar
Project Manager
Infosys Technologies Ltd.
Tel: (408) 853-2346
Bldg - J, San Jose.
_________________________