简体   繁体   中英

yii cgridview from different controller breaks pager

I'm struggling with this problem for almost a week now, so I decided to post it here, if maybe can help me with a different approach.

Yii Framework 1.1.14

I have two controllers PropertiesController and RatesController. The actionUpdate on the PropertiesController renders "properties/view" which has a renderPartial('_rates'). "_rates.php" contains a small form which, through ajax, gets all the fields' information and send it to "rates/create" and it has another renderPartial('_ratesProperty') which has a CGridView with all the rates' information for one property.

The problem is when I create a new rate for the property and the CGridView gets updated, the pagers links changes from "?r=properties/update&id=36&Rates_page=2" to "?r=rates/create&Rates_page=2" my guess is because it retrieves the updated CGridView from the RatesController.actionCreate, so my question is: Is there a chance to modify the links not using Javascript?

Thanks in advance!

最后,我必须在前端解决此问题,每次添加新速率时,都要修改寻呼机的href,以便在当前控制器/操作上工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM