CListView viewData Internet Explorer

Hello

I want to pass a facebook user id variable through ‘itemView’ _view in this manner:




$uid = "Facebook user id";

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

	'dataProvider'=>$dataProvider,

	'itemView'=>'_view',

	'itemGroupMax'=>4,

	'viewData'=>array('uid'=>$uid,),

));



If the CListView has more than 1 page of data items, the subsequent pages will not be passed the variable $uid, is there any way around this? Only the first page receives $uid.

BTW Chrome works for all pages, but not IE.

Thank you very much.

I finally got my friend who started on yii in early 2009 to look at it. He was equally perplexed by what he saw. Is IE8 on WinXP really that bad?

I just tried this… and for me it works… even on IE8…

I noticed in your example the attribute ‘itemGroupMax’ this is not part of the standard CListView… do you use some custom version?

Thanks mdomba for your reply.

Did you use $uid = $facebook->getUser();? If $uid = 1234567890123; it works.

Did you try it on subsequent pages of CListView? $uid is only available on page #1. From page #2 onwards, $uid is not passed, $uid is NULL from gettype($uid). Even when I go back to Page #1, $uid is still NULL until I refresh the page. Chrome works fine, all the time.

‘itemGroupMax’ was what I added to the CListView.

I don’t have $facebook->getUser()… I just put $uid=‘Test’ and in the view echoed that value to see if it would display on every page… and it is displayed on every page…

Agreed, $uid = “Test”; works for all browsers but not $uid = $facebook->getUser(); :(

what does $facebook->getUser()… can you call this method staticali like Facebook::getUser() ?

$facebook->getUser() is found inside facebook.php from php sdk http://developers.facebook.com/docs/sdks/ https://github.com/facebook/php-sdk/

Thanks!

Sorry but I don’t have time to study that code… seems to like the variable/class $facebook is not initialized on all other pages…

Thanks for your reply, but it’s ‘magically’ initialized on all other pages if you use Chrome and not IE8