PDA

View Full Version : html template and update function problem ?



Shijutv
21 Jan 2011, 2:56 AM
Hi All,
i have a Panel which has an html template .
i could see the html view when i call the update function.
Without calling update function, i could not see the html view

What is the relation between html template and update function ?

Another problem is when i view a panel which contains an html template .then i return to parent panel and then again goes to the same panel .at that time i could not see the html view .

i think it is something related to html template and update function

Any help would be appreciated
Shiju

AndreaCammarata
21 Jan 2011, 3:21 AM
Hi Shiju,
the update function allow you to update the content area of yor panel so, calling this function, you are able to everwrite the original panel body html defined before the panel render.
For example:
If you define a panel is this way



var panel = new Ext.Panel({
html: '<p>This is my original HTML value</p>'
});
Obviously you will see your panel body with that html value.
If you call



panel.update('<p>New HTML value</p>');
The panel body will be overwritten with your new html value.
You also have to notice that, if you destroy your panel and then you recreate it like you said here



Another problem is when i view a panel which contains an html template .then i return to parent panel and then again goes to the same panel .at that time i could not see the html view.

Your panel will be render with it's original html value until you don't call the update function again.

I hope I explained myself well, and this reply to what you ask for ;)