searchable

Disable grails Searchable plugin default search page?

人走茶凉 提交于 2019-12-01 03:36:50
问题 I'm trying to disable the Searchable plugin default search page (http://localhost/searchable/), but haven't found a way to do it. Anyone know how this can be done, preferably in a legit way, but resorting to trickery if necessary? 回答1: I usually re-route error code handlers to a controller so I can do some logging or whatever before rendering the view. You can use that here also: class UrlMappings { static mappings = { "/searchable/$action?"(controller: "errors", action: "urlMapping") "/

searchManager.getSearchableInfo(getComponentName()) returns null

微笑、不失礼 提交于 2019-12-01 03:33:02
I've followed this Android guide in order to add a search bar to an activity. The setup looks like this: res/menu/activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/search" android:title="@string/menu_search" android:icon="@android:drawable/ic_menu_search" android:showAsAction="collapseActionView|ifRoom" android:actionViewClass="android.widget.SearchView" /> <item android:id="@+id/menu_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/menu_settings" android

searchManager.getSearchableInfo(getComponentName()) returns null

那年仲夏 提交于 2019-11-30 23:53:31
问题 I've followed this Android guide in order to add a search bar to an activity. The setup looks like this: res/menu/activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/search" android:title="@string/menu_search" android:icon="@android:drawable/ic_menu_search" android:showAsAction="collapseActionView|ifRoom" android:actionViewClass="android.widget.SearchView" /> <item android:id="@+id/menu_settings"