zcontroller This extension provides a new renderPartial method, which renders the clientScript immediatly after the content of the view

  1. Overview
  2. Requirements
  3. Usage

Overview

This extension provide a new renderPartial method.

This method will render the client script (generated from buttons, dropdown list with auto-submit, zii widget and so on) immediatly after the html of the subiew.

This allow to refresh the subview with his relative clientScript, solving many common problem with ajax-refresh

Requirements

Yii 1.1 or above

Usage

For use the extension, save the file in a folder included by Yii.

When you create a div that will be ajax-refreshed, create like that:

<div id="toRefresh">
<?php $this->renderPartialWithHisOwnClientScript('_sibView', $data);?>
</div>

Use the same method even answering to the ajax request:

if (Yii::app()->request->isAjaxRequest)
   $this->renderPartialWithHisOwnClientScript('_sibView', $data);
2 0
5 followers
710 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: zaccaria
Created on: Nov 11, 2010
Last updated: 14 years ago

Downloads

show all

Related Extensions