我试图在我的项目中执行 CJUIAUTO Compllete 软件,但是它行不通。 在过去几天里我研究了这个问题,并尝试了一切。 似乎正在发生( 或者没有发生)的是, 控制器的搜索动作没有被调用 。 如果我将源代码设置为简单的项目系列, 我也无法让它工作 。 我做错什么了?
_form.php 格式化(_f)
<?php $this->widget( zii.widgets.jui.CJuiAutoComplete , array(
model => $model,
attribute => zipcode ,
source => $this->createUrl( address/lookup ),
name => zipcode ,
htmlOptions => array( size => 5 ),
options => array(
showAnim => fold ,
minLength => 1,
)) ?>
地址控制器.php
public function accessRules()
{
return array(
array( allow , // allow all users to perform index and view actions
actions =>array( index , view ),
users =>array( * ),
),
array( allow , // allow authenticated user to perform create and update actions
actions =>array( create , update , lookup ),
users =>array( @ ),
),
array( allow , // allow admin user to perform admin and delete actions
actions =>array( admin , delete ),
users =>array( admin ),
),
array( deny , // deny all users
users =>array( * ),
),
);
}
public function actionLookup()
{
echo "Lookup Action";
}