开发者

How to remove controller from grails programmatically?

Im having some conflicts with the Searchable plugin.

I have a filter which fetches the controller in question in the before phase. It fetches the requested controller by finding the first controller that has the same name as controllerName which is a property available in grails filters.

however, my problem is that the Searchable plugin has its own SearchableController, and i myself have made my own version of the SearchableController. The effect of this is that i have two classes 开发者_运维问答with the same name that would match controllerName in my find logic.

    controller = grailsApplication.controllerClasses.find { c ->
        c.logicalPropertyName == controllerName
    }

Can i somehow remove the SearchableController that comes with the plugin? What are my options?


Maybe this could help you:

http://grails.org/Searchable+Plugin+-+SearchableController+and+view

I found an existing post on this topic: Disable grails Searchable plugin default search page?


I worked around the issue by renaming my SearchableController class to SearchController. Don't like workarounds tho...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜