Cjuiautocomplete Field Inside A Cjui Dialog Box

I have cjuiautocomplete field inside my form.I am rendering my form inside a cjuidialogue.When using render,autocomplete is functioning correctly.But when I use render_Partial, autocomplete is not working.

My code

controller action

public function actionLoandetails()

{

$loandetails=new Loandetails;

$this->render(’_loandetails’,array(‘loandetails’=>$loandetails,));

}

Dialog box displaying form

<?php $this->beginWidget(‘zii.widgets.jui.CJuiDialog’, array( // the dialog

	'id'=&gt;'loandetails',


	'options'=&gt;array(


			'title'=&gt;'Loan Details',


			'autoOpen'=&gt;false,


			'modal'=&gt;true,


			'width'=&gt;920,


			'height'=&gt;600,


			'show'=&gt;array(


					'effect'=&gt;'blind',


					'duration'=&gt;500,


			),


			'hide'=&gt;array(


					'effect'=&gt;'explode',


					'duration'=&gt;100,


			),


			'buttons'=&gt;array(


					'Print'=&gt;'js:function(){ printDiv(&quot;print_content&quot;);}',


					'Cancel'=&gt;'js:function(){ &#036;(this).dialog(&quot;close&quot;);}',


			),


	),

));

?>

<div class="Form"></div>

<?php $this->endWidget(); ?>

I am displaying the form inside the div "Form"

My form

<?php

$form = $this->beginWidget(‘bootstrap.widgets.TbActiveForm’, array(

	'id'=&gt;'verticalForm',





	'htmlOptions'=&gt;array('class'=&gt;'well','enctype'=&gt;'multipart/form-data'),


	'enableAjaxValidation'=&gt;true,


	//'enableClientValidation'=&gt;true,


	//'htmlOptions' =&gt; array('enctype' =&gt; 'multipart/form-data')

)); ?>

<div class="column1">

<?php $this->widget(‘zii.widgets.jui.CJuiAutoComplete’, array(

'name'=&gt;'test1',


'source'=&gt;&#036;this-&gt;createUrl('loan/producttype'),


// additional javascript options for the autocomplete plugin


'options'=&gt;array(


		'showAnim'=&gt;'fold',


	


),


	'htmlOptions'=&gt;array(


			'class'=&gt;'span2',


			'placeholder'=&gt;'Product Type',


	),

));

?>

&lt;?php &#036;this-&gt;widget('zii.widgets.jui.CJuiAutoComplete', array(


'name'=&gt;'test2',


'source'=&gt;&#036;this-&gt;createUrl('loan/product'),


// additional javascript options for the autocomplete plugin


'options'=&gt;array(


		'showAnim'=&gt;'fold',


		'class'=&gt;'span2'


),


		'htmlOptions'=&gt;array(


			'class'=&gt;'span2',	


			'placeholder'=&gt;'Product',


		),

));

?>

&lt;?php echo &#036;form-&gt;textFieldRow(&#036;loandetails, 'Weight', array('class'=&gt;'span2','placeholder'=&gt;'Weight','label'=&gt;false)); ?&gt;





&lt;?php echo &#036;form-&gt;textFieldRow(&#036;loandetails, 'StoneWeight', array('class'=&gt;'span2','placeholder'=&gt;'StoneWeight','label'=&gt;false)); ?&gt;





&lt;?php echo &#036;form-&gt;textFieldRow(&#036;loandetails, 'Number', array('class'=&gt;'span2','placeholder'=&gt;'Number','label'=&gt;false)); ?&gt;


&lt;/div&gt;


&lt;div class=&quot;column2&quot;&gt;


&lt;?php &#036;this-&gt;widget('zii.widgets.jui.CJuiAutoComplete', array(


'name'=&gt;'test3',


'source'=&gt;&#036;this-&gt;createUrl('loan/scheme'),


// additional javascript options for the autocomplete plugin


'options'=&gt;array(


		'showAnim'=&gt;'fold',


),

‘htmlOptions’=>array(

‘class’=>‘span2’,

‘placeholder’=>‘Scheme’,

),

));

?>

&lt;?php echo &#036;form-&gt;dropDownListRow(&#036;loandetails,'UnitMasterId',CHtml::listData(Unitmaster::model()-&gt;findAll(),'UnitMasterId', 'Unit'), array(


							'class'=&gt;'span2','empty'=&gt;'Select Unit','label'=&gt;false ));?&gt;


	


&lt;?php echo CHtml::textField('goldrate','',array('class'=&gt;'span2','size'=&gt;10,'placeholder'=&gt;'Gold rate')); ?&gt;						





&lt;?php echo CHtml::textField('schemeamount','',array('class'=&gt;'span2','size'=&gt;10,'placeholder'=&gt;'Scheme Amount')); ?&gt;





&lt;?php echo &#036;form-&gt;textFieldRow(&#036;loandetails, 'MaxAmount', array('class'=&gt;'span2','placeholder'=&gt;'MaxAmount','label'=&gt;false)); ?&gt;							


&lt;/div&gt;


&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;


&lt;?php &#036;this-&gt;endWidget(); ?&gt;

When I use renderpartial in the controller autocomplete is not working.

What is the problem?

Hi,

renderpartial have 3rd and 4th parameter as true and false… please can you try that

It seems it doesnt work even if you include the renderPartial parameters(the last 2 parameters of renderPartial…) for processing output…you can use the method renderPartialWithOwnScript of ZController and see if it helps…hasnt worked for me because i am doing ajax Call but i think it will be fine for you