Grails中的jQuery UI自动完成

Grails中的jQuery UI自动完成

问题描述:

谁能给我的完整步骤与jQuery UI的自动完成的工作。我使用的Grails 2.0.1。

Can anyone give me the complete steps to work with jquery-ui autocomplete. I am using grails 2.0.1.

我需要一个完整的例子包括code的控制器和视图。

I need a complete example including code for controller and views.

在此先感谢。

首先,你需要在你的main.gsp增加(头部)这行

At first you need to add in your main.gsp (in head) this to lines

 <g:javascript library="jquery"/>
 <g:javascript library="jquery-ui"/>

该插件会自动下载。

the plugin will downloaded automatically.

和完整例如,你可以使用这个链接

and for complete example you can use this link

http://jay-chandran.blogspot.com/2011/09/using-grails-with-jquery-autocomplete.html