PDA

View Full Version : updating components



n00b
30 Aug 2011, 5:18 AM
Hi,

I'd like to know if somebody knows a clean and smart way to replace a component by another.

Example : I've a panel which contains by default a dataview. But, if the user clicks on a button (inside the tbar's panel), it would replace the dataview by a grid (fed by the same datastore as the dataview).

Thank you ! :D

n00b
30 Aug 2011, 5:26 AM
I've got the answer !

the methods remove() and add() of a component. Example :



myPanel.remove(myDataview);
myPanel.add(myGrid);


Problem solved.