velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uday Kumar" <uday.ku...@secf.com>
Subject RE: Problem getting variables from objects in a arraylist
Date Thu, 09 Jun 2005 10:47:06 GMT



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


Mime
View raw message