You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Uday Kumar <ud...@secf.com> on 2005/06/09 12:47:06 UTC
RE: Problem getting variables from objects in a arraylist
try in this way
$case.getSupportcase().getCreateBy()
$case.getSupportcase().getProblem()
Regards,
Uday
-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of marc
Sent: Wednesday, July 06, 2005 3:43 PM
To: velocity-user@jakarta.apache.org
Subject: Problem getting variables from objects in a arraylist
I have this code in a actionservlet(using struts):
******
itx = new InitialContext();
SupportCaseHome ejbcasehome = (SupportCaseHome)
PortableRemoteObject.narrow(itx.lookup("ejb/SupportCaseEJB"),SupportCaseHome
.class);
SupportCase ejbcase = ejbcasehome.create();
cases = ejbcase.getCasesForUser(login.getUser().getWdk());
request.setAttribute("cases",cases);
return mapping.findForward("mycases");
******
then I have this in a .vm file:
*****
<table>
#foreach ($case in $cases)
<tr>
<td>case.getSupportcase().getCreateBy()</td>
<td>case.getSupportcase().getProblem()</td>
</tr>
#end
</table>
******
why do It get this output():
******
case.getSupportcase().getCreateBy() case.getSupportcase().getProblem()
******
and not the right the data??
The classes are avalible, because if I put this in the servlet:
******
SupportcaseDocument scd =(SupportcaseDocument) cases.get(0);
System.out.println("TEST AF SCD "+scd.getSupportcase().getCaseId());
******
I get: TEST AF SCD 10003
******
anybody have anything?
regards //Marc>>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org