Difference between #1 and #2 of
A simple action for CJuiAutoComplete

Revision #2 has been created by tydeas_dr on Mar 23, 2011, 12:09:25 PM with the memo:

layout
« previous (#1) next (#3) »

Changes

Title unchanged

A simple action for CJuiAutoComplete

Category unchanged

Tips

Yii version unchanged

Tags unchanged

autocomplete, actions

Content changed

###Scenario More or less I use auto-complete field for a form. [CJuiAutoComplete](http://www.yiiframework.com/doc/api/1.1/CJuiAutoComplete) is a yii widget for this purposes. The common use case is to make an ajax request and retrieve a list from the database. So in this case you have to write a controller action to return you a json encoded list. What if I had a generic action to do this work for me?
 
###EAutoCompleteAcImplementation
This is a class that extends CAction to do the work for me.
[...]
./webapp/protected/extensions/EAutoCompleteAction.php
~~~

 
###How to uUse
And in my controller I declare this action in the public actions function:
####Declare action in controller

```php
class MyController extends CController
[...]
15 1
19 followers
Viewed: 49 587 times
Version: 1.1
Category: Tips
Written by: tydeas_dr
Last updated by: Thiago Souza
Created on: Mar 23, 2011
Last updated: 13 years ago
Update Article

Revisions

View all history