[Chameleon] Table widget

Berend Veldkamp berend.veldkamp at aris.nl
Thu Sep 16 07:46:55 EDT 2004


Hm, that's strange... When I try that, nothing is displayed at all. As a 
matter of fact, I can't seem to use any html tags.

After some experimenting I found out I need to use < and > instead 
of < and > in my chameleon template, so this works for me:

<cwc2 type="table" start="0" count="10" sharedresourcename="SQLQuery" >
    <TEMPLATE Name="HEADER" Content="&lt;table&gt;&lt;tr&gt;"/>
    <TEMPLATE Name="BODY" 
Content="&lt;td&gt;%colname_1%&lt;/td&gt;&lt;td&gt;%colname_2%&lt;/td&gt;"/>
    <TEMPLATE Name="FOOTER" Content="&lt;/tr&gt;&lt;/table&gt;"/>
</cwc2>

Or is there an easier way?

Berend


Julien-Samuel Lacroix wrote:

> Here's what you need:
> <cwc2 type="table" sharedresourcename="MyResult" >
>    <TEMPLATE Name="HEADER" Content="<table><tr>"/>
>    <TEMPLATE Name="BODY" 
> Content="<td>%col_name1%</td><td>%col_name2%</td><td>etc...</td>"/>
>    <TEMPLATE Name="FOOTER" Content="</tr></table>"/>
> </cwc2>
> 
> The [html_content] should be...html. The body will be repeated for each 
> row in your shared resource. So if MyResult contains:
> col_name1  |  col_name2
> ------------------------
> Joe        |  123
> Bill       |  456
> Jack       |  789
> 


-- 
____________________________

Berend Veldkamp - ARIS
http://www.aris.nl/
____________________________


More information about the Chameleon mailing list