Portlet form with ajax validation?

Hello,

I am looking into this example:

http://www.yiiframework.com/doc/blog/1.0/en/portlet.login

But is there a way to make this example with ajax validation (i.e. sitewide ajax validated form)?

PS - I forgot:

And to be submitted with ajaxSubmitButton, so I can change some content depending on response.

Thanks.

I found the solution here:

http://code.google.com/p/yii/issues/detail?id=2008

Simply, I am using Ajax Validation with standard submit button but with afterValidate() callback in CActiveForm to manipulate the page with JS after save.