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 Wed, 22 Jun 2005 06:25:19 GMT
no Jens, that too doesn't work.

i am calling the jx file as follows from the flow script

        var list = query.findUser(number,hs);
        message = "successful";
         cocoon.sendPage("query.jx",{"message" : message,"list":list})
  
 where list  is  in an  list  of objects.

In my query.jx the following template is used

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

    <jx:forEach var="item" items="${lists}">
        <tr><td bgcolor ="${colour}">${item.users}</td>
                  <td bgcolor ="${colour}">${item.password}</td></tr>
    </jx:forEach>
   
</jx:macro>

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


I get the message  = success printed but i cant get the table to print.

my sitemap to handle query.jx looks like this

<map:match pattern ="*.jx">
             <map:generate type="jx" src="{1}.jx"/>
             <map:serialize type="xhtml"/>
 </map:match>

Should i use the jxtransformer ???

thanks ...


Jens Maukisch wrote:

>Hi Jubin Thomas Kuriakose,
>
>
>  
>
>><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>
>>    
>>
>
>try item.user and item.password
>
>hth
>
>  
>


Mime
View raw message