PDA

View Full Version : [FIXED] [V0.6] AjaxEventUpdate Store



Timothy
Sep 10, 2008, 7:01 PM
Hello,

Would appear that I can not update the Store during an AjaxEvent on a button click.

Could be that store does not have a AjaxEventUpdate for serialization.

Cheers,
Timothy

Vladimir
Sep 11, 2008, 7:45 AM
Hi Timothy,

I have added support of the Store DataBinding during an AjaxEvent. Unfortunately didn't test with all examples but it seems works good.

Please let me know if have problems with it

Timothy
Sep 11, 2008, 8:30 AM
Vlad ... absolutely awesome! Thank you so much!

Cheers,
Timothy

Timothy
Sep 11, 2008, 10:31 AM
Vlad,

Would appear that the fix is not friendly with TabPanel DeferredRender property enabled; the AjaxEvents request is returning the data for not visible Stores in other tabs that have not rendered :)

Cheers,
Timothy

Timothy
Sep 11, 2008, 10:48 AM
The following modification worked for me on StoreDataBound.cs:



public void AjaxDataBind()
{
if (Ext.IsAjaxRequest && this.IamAjaxRequestInitiator)
{
return;
}

if (!this.ajaxDataBindingRequired)
{
return;
}

this.RequiresDataBinding = false;



Changed to:



public void AjaxDataBind()
{
if (Ext.IsAjaxRequest && this.IamAjaxRequestInitiator)
{
return;
}

if (!this.ajaxDataBindingRequired)
{
return;
}

if (!this.Visible || !this.Enabled)
{
return;
}

this.RequiresDataBinding = false;


Would that make sense vlad?

Cheers,
Timothy

Vladimir
Sep 11, 2008, 12:05 PM
Hi Timothy,

Good find. I'll review Store and other controls for correct behaviour on AjaxEvent. I think your fix is correct.

Timothy
Sep 11, 2008, 12:14 PM
Great, let me know when you're done and I'll run my test cases against SVN again :)

Keep up the awesome job both of you, this toolkit has really evolved nicely over the past couple weeks!

Cheers,
Timothy

Vladimir
Sep 11, 2008, 12:42 PM
Hi Timothy,

Geoffrey suggested check this.IsParentDeferredRender instead Visible and Enabled

The changes in SVN

Timothy
Sep 11, 2008, 12:45 PM
Good suggestion, I'll keep that in mind for later :)

Thanks, I'll confirm SVN.

Cheers,
Timothy