RRListView - a CListView extension to allow Ajax browser history

Only one way to find out: comment it out. :)

But it sounds likely.

ok, it’s in line 157:




$.fn.yiiGridView.selectCheckedRows(id);



and if i make a comment arround, after i try to make a paging, then the complete js, code fails…

Are you passing an id in htmlOptions for the widgets?

yes, id is passed:




$this->widget('ext.RRViews.RRGridView', array(

	'id'=>'customer-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

        'extensionAssets' => Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('ext.RRViews.assets')),

        'cssFile' => Yii::app()->baseUrl . '/css/gridview/styles.css',

        'ajaxUrl'=>CHtml::normalizeUrl(Yii::app()->createUrl('/customer/customeradminplain')),

        //'selectionChanged'=>'jumpToUpdate',

        'selectableRows'=>2,

        'columns'=>array(



I meant in a ‘htmlOptions’ array within the options array.

I could be wrong, of course.

Check that the id is set properly (view source) - otherwise the first widget, or is it the second? would fail due to same id.

Hi, I added the id to html-options… now i still have a problem…

2416

Bildschirmfoto 2012-01-05 um 10.20.21.png

I first had an improvement while i was adding a Column customer_id at first column (in sample its id) which removes the first error, but as shown in the pic, paging doesn’t work anymore…

Thank you so much for your support!

The problem is that in revision 3486 selectCheckedRows() was made private and rrviews is using this function.

Take a look at svn/tags/1.1.9/framework/zii/widgets/assets/gridview/jquery.yiigridview.js on code.google.com

While extension developers are working on the update, here’s the workaround that worked for me: just revert Yii’s jquery.yiigridview.js (located in Yii framework dir in zii/widgets/assets/gridview/) to revision 3437 (yii.googlecode.com/svn-history/r3437/trunk/framework/zii/widgets/assets/gridview/jquery.yiigridview.js).

Do not forget to empty your application’s assets folder after that.

THANK YOU!!! This workaround is working! Hope that rrviews or yii-developers will come with a path soon, as I’m not very good in managing to many different versions of the perfect components everybody builds here!

It’s true – RRGridView and friends are broken with Yii 1.1.9 or higher. The JS for yiiGridView has changed significantly.

Has this issue been fixed?

Sorry for not having replied before - I haven’t looked at this thread for some time, and for some reason I haven’t had any notification emails about people adding comments.

This issue has not been fixed yet. I have a version that I have modified which is running ok, but I’m not satisfied enough to release that yet, and haven’t had the time to work properly on it. As Preston pointed out, there has been pretty much a complete rewrite of the Javascript for CListView and CGridView, so everything I did to try and ensure forward compatibility has been to no avail. That said, I think the rewrite is a significant improvement, but because it uses anonymous functions, I haven’t found a way that is to my liking to override the framework Javascript without impacting functionality for the standard grid and list views. It may be that I just have to accept that I can’t extend the Yii Javascript and just replace it with my own.

Anyway, sorry for the delay (I hadn’t seen that people were asking for it), and I will upload something that works soon (even though it may not be very forward compatible).

Actually, just having snooped around on GitHub a bit, I see that support has been added to CListView and CGridView for Html5 history - is there any point in my updating my extension given this?