Hello,

In T4 I have a table with a dynamic number of rows and columns. The cells are checkboxes.

<table class="profilesTable" jwcid="[EMAIL PROTECTED]:TableView" source="ognl:features" columns="ognl:columns" pageSize="100">
        <tr height="30px" jwcid="[EMAIL PROTECTED]:TableColumns" />
        <tr jwcid="[EMAIL PROTECTED]:TableRows" row="ognl:currentFeature">
                <span jwcid="@For" source="ognl:columns" 
value="ognl:currentValue">
                        <td>
                                <span jwcid="@Checkbox" value="ognl:hasLink" />
                        </td>
                </span>
        </tr>
</table>

Now, for this to work, I made a subclass of org.apache.tapestry.contrib.table.model.simple.SimpleTableColumn
which contains the object representing the current column.

When I submit my form, the set... function is called and using the current column and current row, I know what to do with the state of my checkbox.

Well, since I don't have a Table component in T5, and Grid does not "seem" to be the same since it takes the columns from an object, I don't know how to recuperate the value of the current row and column upon submit:

  <table lass="rolefoundationlist">
        <tr class="rfheaderrow" style="width:120px;">
                <td></td>
                <t:loop elementName="td" source="profiles" value="currentProfile" 
>
                        ${currentProfile.abbrEn}
                </t:loop>
        </tr>
        <t:loop elementName="tr" source="features" value="currentFeature">
                <td>${currentFeature.abbrEn}</td>
                <t:loop elementName="td" source="profiles" 
value="currentProfile">
                        <t:checkbox value="hasLink"/>
                </t:loop>
        </t:loop>
  </table>

The checkboxes are correctly initialized, but I can't handle the submit.

Any idea how to proceed?

Thanks,

--
Alexander Lamb
Founding Associate
RODANOTECH Sàrl

4 ch. de la Tour de Champel
1206 Geneva
Switzerland

Tel:  022 347 77 37
Fax: 022 347 77 38

http://www.rodanotech.ch



Reply via email to