Hi,

I stumbled upon the next warning a couple of times already and I still
don't understand why I'm getting it. In our tapestry application we're
using jquery datatables and it works ok. But in some cases the application
starts giving me a javascript alert: *"Warning: TableTools 2 requires
DataTables 1.9.0 or newer - www.datatables.net/download"*.

In the Javascript console I see the following errors:

TypeError: f.fn.DataTable is undefined

...ools:{});TableTools._aInstances.push(a);return
a.dom.container},cFeature:"T",sFe...

TableTools.js (line 76)
TypeError: j is undefined

...(){},open:function(){},close:function(){}};f.models.field={className:"",name:nul...

dataTa....min.js (line 13)
TypeError: $.fn.dataTable is undefined

editor = new $.fn.dataTable.Editor(options);// editor



This is my tml file:

<html t:type="layout"
      title="Modules"
      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
      xmlns:h="tapestry-library:jquery"
      xmlns:p="tapestry:parameter">

    <div class="container">
        <br style="clear: both;" />

            <t:form t:id="moduleForm" id="moduleForm" class="TTWForm
ui-sortable" t:type="form" >
            Choose module:
                <select t:type="select"
                    t:id="selectModule"
                    t:model="moduleSelectModel"
                    encoder="moduleSelectEncoder"
                    t:value="module"
                    />
                <input type="submit" value="Submit"/>
        </t:form>

        <div class="clear"></div>
    </div>

    <t:if test="isModuleSelected">
        <table t:type="jquery/datatable" t:id="najdiEdiDataTable"
t:source="datasource"
                       t:row="dataTableRow" t:rowIndex="index"
t:model="sourcemodel"
                       t:rowsPerPage="10" t:options="dataTableOptions"
t:mode="true" />
    </t:if>

</html>


... Notice the section <t:if test=...>
I'm trying not to display the datatable if there is no option selected via
the dropdown menu.
If I remove the <t:if>, there is no warning and the datatable is always
displayed. If there is no option selected in the dropdown menu, it is
empty, which is fine.

So why the javascript error? What does the <t:if> have to do with it?

Thanks in advance,
Lidija

Reply via email to