PDA

View Full Version : How to refresh a template in a panel ?



Dragnalith
28 Jul 2011, 7:12 AM
Hi,
I have a template embedded in a Panel. The data for the template are received by ajax.
If I change data how refresh the template ? I don't find any render() or refresh() methode for a panel.
Has any one an idea ?

Edit: So sorry, wrong forum. I was reading both

jjerome
29 Jul 2011, 10:23 AM
I dont necessarily do the following with html templates in Panels, but I do do this with DataViews inside of Panels. It's a quick (thought-of) way to refresh something like that.


When the data changes, check to see if the component exists.

If the component exists, destroy the component, then recreate the component and add it back into the parent component.

Then call a doLayout() on the parent component.

Dragnalith
29 Jul 2011, 11:01 AM
In fact I found the method. It's update([data]) !
Thanks

neoart
24 Feb 2013, 8:08 AM
In fact I found the method. It's update([data]) !
Thanks
Thanks,it really work for me!!