pagelist's refresh() method go wrong

my pagelist:


id:“selectFriendsViewPagelistImg”,
view : “pagelist”,
data : fileDataList, //this is jsonArray
datatype : “json”,

I want to change fileDataList data ,and refresh the pagelist.


$$(‘selectFriendsViewPagelistImg’).define(“data”, fileDataList);
$$(“selectFriendsViewPagelistImg”).refresh();

and have problem:
when I add the “fileDataList” data ,pagelist have add too;
but When I remove the “fileDataList” one data, pagelist donn’t have remove this data.
why?
have anybody help me ,very thank you.

Try to use

var list = $$('selectFriendsViewPagelistImg'); list.clearAll(); list.parse(fileDataList);

It’s OK now ,thank you very much; :smiley: