CHtml::$liveEvents

Events attaching to buttons in “live” mode cause all sorts of problems if they’re embedded within forms received via AJAX. As far as I understand, there’re two options:

  1. set “live” property of “htmlOptions” argument to false;

  2. set CHtml::$liveEvents to false.

I’ve chosen the latter and set CHtml::$liveEvents to false in init() of my controller dealing with AJAX requests.

Question. Will setting CHtml::$liveEvents=false cause any problems? Does any code in Yii really depend on it, or is it just optimization for cases of huge numbers of controls, for which “live” mode is way faster?

Also, can it be fixed on the framework level? Single buttons obviously don’t need “live” events, so “live” property can be set to false for them by default.

this "live" property applies only to the client side… and decides if jQuery will bind or delegate an event…

about the difference check the jQuery documentation for the on() method - http://api.jquery.com/on/

I know the difference. The question is, will it break client-side code of Yii in any way? Do any widgets or other functionality depend on it?