append method to end of autocomplete created by CJuiAutoComplete

hi

how to add methods to end of autocomplete created by CJuiAutoComplete.

with CAutoComplete we could use methodChain properties.

what is replacement for methodChain in CJuiAutoComplete?

Using select?




$this->widget('zii.widgets.jui.CJuiAutoComplete', array(

  ...,

  'options'=>array(

     'select'=>"js:function(event, ui) {

       ...

     }"

  ),				 

));



thank u but i need this code.


$("#findUserIdDisplay").autocomplete({

        source: "ui_autocomplete_users_withuname.php",

        minLength: 2,

    select: function(event, ui) {

        $('#findUserId').val(ui.item.id);


    return false;

        }

    })//the below part should be created by methodChain

    .data("autocomplete")._renderItem = function( ul, item ) {

       return $( "<li></li>" )

           .data( "item.autocomplete", item )

           .append( "<a>"+ item.label + "</a>" )

           .appendTo( ul );

       };