datatables search capability
See original GitHub issueHello 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:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey Damien @darrachequesne,
it’s work like a charm now! thanks a lot for your help!!
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 😄