many thanks for your answer and your advice.
The source code generated by my code is the following (I have attached the headers and one data row):
<TR class=header>
<TD class=sortable>
<DIV onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'" onclick="jQuery.jmesa.addSortToLimit('orden.idEjercicio','0','codigo','asc');onInvokeAction('orden.idEjercicio', 'sort')">
Código
</DIV>
</TD>
<TD class=sortable>
<DIV onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='default'" onclick="jQuery.jmesa.addSortToLimit('orden.idEjercicio','1','descripcion','asc');onInvokeAction('orden.idEjercicio', 'sort')">
Descripción
</DIV>
</TD>
</TR>
</THEAD>
<TBODY class=tbody>
<TR id=orden.idEjercicio_row1 class=odd onmouseover="this.className='highlight'" onmouseout="this.className='odd'">
<TD>2005</TD>
<TD>2005</TD>
</TR>
And in the whole generated code there is no reference to my method onclick.
Many thanks.