question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

datatables search capability

See original GitHub issue

Hello Damien,

I am working on the search, the last missing bit. I had a look at your description here as well as at the a bit outdated one here and this one.

However, I can’t get the search field to work as it should. An exception gets thrown, which isn’t to revealing for me.

I added a Specification class to handle the search parameter, but no luck.

So, how could a simple search over all fields be realised? It would be great if the search worked in a generic way, on all members of type string for example.

Or can a dynamic method call such as DataTablesOutput<Meeting> findAllByTitle(DataTablesInput input, String title); be used?

Kind regards, Tom

21:28:55 ERROR (DirectJDKLog.java:182) : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction marked as rollbackOnly] with root cause
javax.persistence.RollbackException: Transaction marked as rollbackOnly
    at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:74) ~[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final]
    at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) ~[spring-orm-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757) ~[spring-tx-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) ~[spring-tx-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:521) ~[spring-tx-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291) ~[spring-tx-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at com.ryantenney.metrics.spring.TimedMethodInterceptor.invoke(TimedMethodInterceptor.java:48) ~[metrics-spring-3.0.4.jar:na]
    at com.ryantenney.metrics.spring.TimedMethodInterceptor.invoke(TimedMethodInterceptor.java:34) ~[metrics-spring-3.0.4.jar:na]
    at com.ryantenney.metrics.spring.AbstractMetricMethodInterceptor.invoke(AbstractMetricMethodInterceptor.java:59) ~[metrics-spring-3.0.4.jar:na]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653) ~[spring-aop-4.1.7.RELEASE.jar:4.1.7.RELEASE]

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
diorndkcommented, Apr 13, 2021

Hey Damien @darrachequesne,

it’s work like a charm now! thanks a lot for your help!!

1reaction
tomcgncommented, Nov 24, 2015

Damiens Spring Data JPA datatables work great! Especially if one links jquery.spring-friendly.js properly in the containing HTML as described e.g. here 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

searching - DataTables
Searching in DataTables is "smart" in that it allows the end user to input multiple words (space separated) and will match a row...
Read more >
Individual column searching (text inputs) - DataTables example
DataTables has the ability to apply searching to a specific column through the column().search() method (note that the name of the method is...
Read more >
column().search() - DataTables
While search() provides the ability to search globally across the table, this method, and its plural counterpart, provide the ability to search for...
Read more >
search - DataTables
The search event is fired whenever the table's searching is triggered by the global search or columns search options, including calls from the...
Read more >
Custom filtering - range search - DataTables example
DataTables provides an API method to add your own search functions, $.fn.dataTable.ext.search . This is an array of functions (push your own onto...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found