Spring code convert to DataTables. File exists
Spring code convert to DataTables. File exists
arnolddd97
Posts: 8Questions: 3Answers: 0
I want to examine if the file exists.
If a file exists, 2 buttons will be unloaded
This is the spring code I want to convert to DataTables
<td th:if="${@videoRecordService.isFileExist(pickingHead.delivNoteNumber)}">
<a th:href="${'/videoAdmin/videoDownload/'+pickingHead.delivNoteNumber}"
target="_blank" class="btn btn-default" th:text="#{download}"></a>
<a href="#" th:attr="data-filename=${pickingHead.delivNoteNumber}"
class="btn btn-default watch-video" th:text="#{watch}"></a>
</td>
<td th:if="!${@videoRecordService.isFileExist(pickingHead.delivNoteNumber)}">
</td>
My current Datatbles code
"targets": [ 7 ],
"render":function(data ,type, row, meta){
return '<a href="/videoAdmin/videoDownload/'+ row.delivNoteNumber+'"' +
' target="_blank" class="btn btn-default" th:text="#{download}">Download</a>'+
'<a href="#" th:attr="data-filename='+row.delivNoteNumber+'"'+
'class="btn btn-default watch-video" th:text="#{watch}">Watch</a>'
}
This discussion has been closed.