Bug 672 - [Chameleon-Widget] Table widget generalization enhancement
: [Chameleon-Widget] Table widget generalization enhancement
Status: NEW
: Chameleon
Widget
: 1.99
: PC All
: P5 enhancement
: FUTURE
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-09-15 15:43 by
Modified: 2004-10-21 14:13 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-09-15 15:43:00
The current implementation of the templating system in the Table widget requires
that the developer know the structure of the data that they wish to display,
specifically they need to know the names of the columns.

A more generic approach would be useful in certain situations that arise when
the column names are not known in advance.

In this case, we could use a templating system that allows us to reference a
template from within a template.  For instance:

<template name="header"><![CDATA[
<table>
  <tr>
    %COLHEADERTEMPLATE%
  </tr>
]]></template>

<template name="colheadertemplate"><![CDATA[
    <td>%COLNAME%</td>
]]></template>


<template name="body"><![CDATA[
  <tr>
    %COLBODYTEMPLATE%
  </tr>
]]></template>

<template name="colbodytemplate"><![CDATA[
    <td>%COLDATA%</td>
]]></template>

The special variables %COLNAME% and %COLDATA% can be used to reference the
current column name (currently this only works in the body) and the current
column data value (in the body only, for each row).

In the code that parses the template for %<var>%, we can test to see if <var> is
the name of a template and process that template for every column of data.
------- Comment #1 From 2004-10-21 14:13:03 -------
Changed target to FUTURE.