Hi,

That behaviour actually comes from column headers. They are provided from
the columns themselves, and TableColumns simply enumerates the columns and
renders their headers. You may have more than one TableColumns as a result
if you wish.

I have to check the example, but as far as I remember, in it the columns
were defined using a String.

Simply place '*' in front of that column definition string in TableView, and
the column headers will automatically start submitting the form.


If you are interested in the code, placing the asterix in front causes the
following to be invoked on the generated columns:


objColumn.setColumnRendererSource(SimpleTableColumn.FORM_COLUMN_RENDERER_SOU
RCE);

Hope that helps...

-mb

----- Original Message ----- 
From: "Tim Downey" <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Monday, May 02, 2005 7:49 PM
Subject: How to preserve form submit with custom TableColumns


Hi,

I'm working through the Tapestry Tables examples from John Reynolds
and am stumped on how to preserve the FormTable semantics when
overriding the TableColumns in a TableView component.

When the table is a FormTable, clicks on the column headers will use
javascript to submit the form prior to sorting.  This behavior is
necessary for a form table.  I'd like to override the
TableColumns component, but preserve this submit behavior, but don't
quite see how.

Here's the example:

   <table class="mytable" jwcid="tableView">
  <span jwcid="tableColumns"/>
  <span jwcid="tableRows">
          <span jwcid="[EMAIL PROTECTED]">
             <span jwcid="editableBirthDate"/>
          </span>
          <span jwcid="[EMAIL PROTECTED]">
             <span jwcid="editableWeight"/>
          </span>
      <span jwcid="[EMAIL PROTECTED]:TableValues"/>
      </span>
      <tr>
         <td colspan="7" class="tablepager">
            <span jwcid="[EMAIL PROTECTED]:TableFormPages"/>
         </td>
      </tr>
      </table>

where tableColumns is defined as:

    <component id="tableColumns" type="contrib:TableColumns">
        <static-binding name="class" value="columnheader"/>
    </component>

How do I specify tableColumns such that it will still perform the form
submit javascript for me?  I didn't see anything like
contrib:TableFormColumns.  Am I missing something?

Regards,
-tim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to