cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jubin Thomas Kuriakose <j...@integerblr.com>
Subject Re: using java objects in jx templates
Date Tue, 21 Jun 2005 20:08:37 GMT
To be more clear the flowscript passess a list object as ${list} to the 
query.jx. Each object in the list object has two methods getUser() and 
getPassword()...

I defined the following macro for the above to iterate an show all the 
retrieved values as a table


<jx:macro name="tablerows">
    <jx:parameter name="lists"/>
    <jx:parameter name="color"/>

    <jx:forEach var="item" items="${lists}">
        <tr><td bgcolor ="${colour}">${item.getUsers()}</td>
                  <td bgcolor ="${colour}">${item.getPassword()}</td></tr>
    </jx:forEach>

</jx:macro>

<table>
    <tablerows list="${list}" color="blue"/>
</table>
       

Could any one tell me if this is the right way to do it..

thnks all

Jubin Thomas Kuriakose wrote:

> Hi
> I got a flowscript that passes a list of objects to a query.jx file 
> (uses jx templates) . Could anyone tell  me how to access those 
> objects from the list preferably iteratively using jxtemplates...
>
> thnks for all the help
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message