5

I'm trying to implement an advanced example of jquery.ui.autocomplete widget with categories ( http://jqueryui.com/autocomplete/#categories ). My code basically looks just like in this example's source code but for some reason, when i'll type something in input field, autosuggest don't work and i'm getting this error in object inspector javascript console:

Object #<Object> has no method '_renderItemData' 

Have you any idea what am i possibily doing wrong? The basic example works fine on my website. Thanks in advance.


Propel filterBy not work?

Im trying test if an username already exists. But always return "username exists":

   if (!isset($_POST['usuario'])) {
    /* Parameters not pass */
    exit("{'success': false, 'msg': 'No hay parametros.'}");
   }

   /* Search a user with username == $_POST['usuario'] */
   $usuarioCohincidente = UsuariosQuery::create()
                          ->filterByNombreusuario($_POST['usuario'])
                          ->find();

   if($usuarioCohincidente->isEmpty()){
       /* Username is available */
       exit("{'success': false, 'msg':'Usuario inexistente.'}");
   }else{
      /* Username is not available */
      exit("{'success': true, 'msg': 'Usuario existente, por favor, seleccione otro      nombre para el usuario.'}");
   }

Any idea ?.

4

1 回答 1

9

使用方法_renderItem而不是_renderItemData. 这个例子是错误的。

于 2012-12-04T09:42:38.450 回答