How to redraw a component

Hello experts!
In my application,I use the list Component.After the data(e.g data:cards) changed,I need to redraw the list.I tried a number of methods, but all failed.Here is my code:

	/* $$("cardlist").render(); */
	/* $$("cardlist").resize(true) */
	/* $$("cardlist").define("data",cards); */
	/* $$("cardlist").add({Img:"./img/wuhan.png",Name:selectedcard}, 1); */
	/* $$("cardlist").resize(true); */
	$$("cardlist").refresh();

please help me, thanks a lot.

Hello,

You can use the following approach:

// removes existent data $$("cardlist").clearAll(); // load new data set $$("cardlist").parse(cards);

This works. Thank you.