Class CJuiAutoComplete
CJuiAutoComplete displays an autocomplete field.
CJuiAutoComplete encapsulates the JUI autocomplete plugin.
To use this widget, you may insert the following code in a view:
$this->widget('zii.widgets.jui.CJuiAutoComplete',array( 'name'=>'city', 'source'=>array('ac1','ac2','ac3'), // additional javascript options for the autocomplete plugin 'options'=>array( 'minLength'=>'2', ), 'htmlOptions'=>array( 'style'=>'height:20px;', ), ));
By configuring the CJuiWidget::$options
property, you may specify the options that
need to be passed to the JUI autocomplete plugin. Please refer to the JUI AutoComplete API documentation for possible options (name-value pairs) and
JUI AutoComplete page for general description and demo.
By configuring the CJuiAutoComplete::$source
property, you may specify where to search
the autocomplete options for each item. If source is an array, the list is used
for autocomplete. You may also configure CJuiAutoComplete::$sourceUrl
to retrieve
autocomplete items from an ajax response.
- CComponent
- CBaseController
- CWidget
- CJuiWidget
- CJuiInputWidget
- CJuiAutoComplete
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Sebastian Thierer <sebathi@gmail.com>
Since: 1.1.2
Located at x2engine/framework/zii/widgets/jui/CJuiAutoComplete.php
public
|
hasModel(),
resolveNameID()
|
getScriptFile(),
init(),
registerCoreScripts(),
registerScriptFile(),
resolvePackagePath(),
setScriptFile()
|
__construct(),
actions(),
getController(),
getId(),
getOwner(),
getViewFile(),
getViewPath(),
render(),
setId()
|
beginCache(),
beginClip(),
beginContent(),
beginWidget(),
createWidget(),
endCache(),
endClip(),
endContent(),
endWidget(),
renderFile(),
renderInternal(),
widget()
|
public
mixed
|
$source | array() |
#
the entries that the autocomplete should choose from. This can be
|
public
mixed
|
$sourceUrl |
|
#
the URL that will return JSON data as the autocomplete items.
CHtml::normalizeUrl() will be applied to this property to convert the property
into a proper URL. When this property is set, the |
$attribute,
$model,
$name,
$value
|
$_scriptFile,
$cssFile,
$htmlOptions,
$options,
$scriptUrl,
$theme,
$themeUrl
|
$actionPrefix,
$skin
|
$controller,
$id,
$owner,
$viewPath
|