velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc <wdkm...@wilson.dk>
Subject Problem getting variables from objects in a arraylist
Date Wed, 06 Jul 2005 10:12:43 GMT
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


Mime
View raw message