Update content in AJAX with renderPartial

Comparing #4 with #5

Revision #5 was created by Michael Sullivan Michael Sullivan on Feb 13, 2010, 11:45:47 PM.

Added note to change accessRules() when adding new controller function

Content

[...]
The actionIndex set myValue to "Content loaded" and this variable is passed to the view "index.php" and to "_ajaxContent.php"

<br />

*Note:  if using accessRules() in your controller file, you will need to modify accessRules() by adding the appropriate part of the function name to a rule set - in this case*  'updateajax'   *like this:*
 
 
array('allow',  // allow all users to perform 'index' and 'view' actions
 
'actions'=>array('index','view','updateajax'),
 
'users'=>array('*'),
 
),
 
 
 
 
#### views/helloWorld/index.php

```php
<div id="data">
<?php $this->renderPartial('_ajaxContent', array('myValue'=>$myValue)); ?>
</div>
[...]