jqueryjspdatatabletaglibdandelion

Dandelion Datatable taglib column filter not showing


I try to use dandelion datatable taglib on my datatable, this is my code:

<%@ taglib prefix="datatables" uri="http://github.com/dandelion/datatables" %>

    <datatables:table  row="row" id="interviewTable" url="/admin/interviews-loadtable" paginationType="full_numbers" cssClass="display table table-striped" 
        stateSave="false" serverSide="true" processing="true" autoWidth="true" pageable="true" filterPlaceholder="head_after" dom="l0frtip">
                <datatables:callback type="draw" function="bela"/>
                <datatables:column title="Candidate" property="candidate.name" filterable="true" filterType="input" filterMinLength="1" filterCssClass="search_init text"/>             
                <datatables:column title="Title" property="job.title" filterable="true" filterType="input" filterMinLength="1" filterCssClass="search_init text"/>
                <datatables:column title="Date" property="date" filterable="true" filterType="select" filterCssClass="search_init text datetime filter_change"/>
                <datatables:column title="Status" property="status" filterable="true" filterType="select" filterCssClass="search_init select_status"/>
                <datatables:column title="Buttons" filterable="false" renderFunction="buttons" cssCellClass="center buttons" sortable="false" cssStyle="width: 100px;"/>
    </datatables:table>

When I use filterable="true" for column filtering, it generates this code:

<tr role="row">
  <th rowspan="1" colspan="1">Candidate</th>
  <th rowspan="1" colspan="1">Title</th>
  <th rowspan="1" colspan="1">Date</th>
  <th rowspan="1" colspan="1">Status</th>
  <th style="width: 100px;" rowspan="1" colspan="1">Buttons</th>
</tr>

I would expect to generate somthing like this

  <tr role="row">
      <input class="search_init text" type="text">
      <input class="search_init text" type="text">
      <input class="search_init text datetime" type="text">
      <input class="search_init select_status" type="text">
      <th></th>
    </tr>

And in console I get errors like this:

TypeError: oTable_interviewTable.dataTable(...).columnFilter is not a function oTable_interviewTable.dataTable(oTable_interviewTable_params).columnFilter({

and

"NetworkError: 404 Not Found - http://localhost:8080/HRS/dandelion/datatables/filtering/filteringaddon.js"

The table looks fine, and it works fine, I have problems just with the column filter. Can somebody explain why is this happening and how can I use column filter?


Solution

  • This bundle helped me:

    {
       "bundle" : "any-name",
       "assets": [
            {
                "name": "dandelion-filtering", <= don't change this name, in order to override the asset
                "version": "1.6.1", <= doesn't matter (yet)
                "type": "js",
                "locations": {
                    "webapp": "/your-asset-directory-inside-your-webapp/your-modified-filteringaddon.js"
                }
            }
        ]
    } 
    

    I put in src/main/resources/dandelion, and now it loads the filteringaddon.js