i want to query sth via webservice,now i can got the data,but i dont know how to render the search form in view file,here is my controller code:
$arrOptions=array(
'uri'=>'http://localhost/shop',
'location'=>'http://localhost/shop/soap/get.php',
'trace'=>true,
);
$soapObject = new SoapClient(null,$arrOptions);
$retData = $soapObject->search_goods_with_name('');
$goodsDataProvider = new CArrayDataProvider($retData['info']);
and my view code:
<div class="search-form">
<?php $this->renderPartial('_searchgoods',array(
'dataProvider'=>$goodsDataProvider,
)); ?>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'shop-order-grid',
'dataProvider'=>$goodsDataProvider,
'columns'=>array(
'goods_name',
'shop_price',
),
)); ?>
</div>
_searchgoods code
<div class="wide form">
<?php $form=$this->beginWidget('CActiveForm', array(
'action'=>Yii::app()->createUrl($this->route),
'method'=>'get',
)); ?>
<div class="row">
<?php echo $form->textField($model,'goods_name'); ?>
</div>
<div class="row buttons">
<?php echo CHtml::submitButton('搜索'); ?>
</div>
<?php $this->endWidget(); ?>
</div>
and the error msg is "CArrayDataProvider does not have a method named getValidators",can anyone help me?