Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: Grails-FilterPane 2.0
-
Fix Version/s: None
-
Labels:None
-
Environment:Ubuntu 11.04, SpringSource STS
Description
I use a direct link to a filter action in one of my views. The link uses <g:link> but it produces a link to the filter action like this:
http://localhost:8080/billing-web/book/filter?sort=&order=&filter.op.author.id=Equal&filter.author.id=2
(I actually created some tags that produces the correct links, see http://jira.grails.org/browse/GPFILTERPANE-35)
I find this really powerful since I can create a link from the "author" page that goes directly to a page where the correct "books" are sorted out.
In 2.0 of the filterpane plugin, this causes the currentCriteria tag in the list view to crash with the exception described below if it is used directly after startup of the server. Once the list action of the BookController has been used once, the link works as expected after that. In 0.7 version of the plugin this worked as expected.
Exception:
ERROR [web.errors.GrailsExceptionResolver] Exception occurred when processing request: [GET] /billing-web/book/filter - parameters:
sort:
order:
filter.productionReport.id: 2
filter.op.productionReport.id: Equal
Stacktrace follows:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <filterpane:currentCriteria>: No such property: filterPaneFieldNamePrefix for class: org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassProperty at /home/myname/workspace/bookstore-web/grails-app/views/book/list.gsp:19
at java.lang.Thread.run(Thread.java:662)
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <filterpane:currentCriteria>: No such property: filterPaneFieldNamePrefix for class: org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassProperty at /home/myname/workspace/bookstore-web/grails-app/views/book/list.gsp:19
at home_stejon0_workspace_billing_billing_web_grails_app_views_book_list_gsp$_run_closure2.doCall(list.gsp:19)
at home_stejon0_workspace_billing_billing_web_grails_app_views_book_list_gsp$_run_closure2.doCall(list.gsp)
at home_stejon0_workspace_billing_billing_web_grails_app_views_book_list_gsp.run(list.gsp:67)
... 1 more
Caused by: groovy.lang.MissingPropertyException: No such property: filterPaneFieldNamePrefix for class: org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassProperty
at org.grails.plugin.filterpane.FilterPaneTagLib.resolveFieldName(FilterPaneTagLib.groovy:676)
at org.grails.plugin.filterpane.FilterPaneTagLib.this$2$resolveFieldName(FilterPaneTagLib.groovy)
at org.grails.plugin.filterpane.FilterPaneTagLib$_closure6_closure17.doCall(FilterPaneTagLib.groovy:238)
at org.grails.plugin.filterpane.FilterPaneTagLib$_closure6.doCall(FilterPaneTagLib.groovy:168)
... 4 more
Having the same issue. Is there any workaround or something?