Listview update

Hello everyone,

is there any way to add items to an existing Listview correctly? I’m creating a Web app for my watch, and I need when i am on the last item in the list download and add more items using XmlHttpRequest and display them correctly. I tried Listview and Virtual list, but after downloading other items, items will not be added to the end of the list correctly.
W-4.0-circle-x86-preview-2020-06-09-093833
Does anyone have an example of how to add items correctly or refresh the list correctly? Thank you very much.

Greetings, I also was testing a lot, as the exact behaviour of list / Listview / Arclistview is not really clear to me. And I had similar issues like you.
Somehow as you see you have one list above another Arclist style type list.
Try to destroy the created Listview before you add another one.
If you have a handle to the current Listview you can try to use the .addItem of your listview element. That might work for you to add items to the list. But formatting is somehow messed up. (Especially when using <a> tag). Also removing Items did not work for me.
Somehow with dynamic lists the Tau widgets are a little bit strange to use (my opinon). At least I managed somehow to have it look ok. Although the scrollbar is messed up…
For me it was working, when all the dynamic work was done before the page was shown. Then you can create one of the Tau widgets from it and it looks ok.
So how I use dynamic lists is, I keep all the information in objects, so I rewrite all the list. First I clear it, write the normal list items to the DOM, then make the TAU widget:
var list = document.getElementById("listid"); //get list handle
var listview = Tau.widget.Listview(list);
listview.destroy(); //detroy existing listview / Tau widget
list.innerHTML = "" //clear list
//create element and add all your elements
listItem = document.createElement('li');
listItem.innerHTML = "your List entry here";
list.appendChild(listItem);
//create the new Listview widget
listview = Tau.widget.Listview(list)
Also make sure the circle-helper.js is not creating the (Arc)Listview before you are ready. I just removed that line there. Maybe also make the initial static list as hidden style in your index.html, or just leave it empty there.
As I said, this is my workaround, since there seems not to be a transparent way to get and modify the elements with Tau in a dynamic way.
Btw. there is also a tizenschool.org lesson, where they deal with Tau lists a lot. Search for TAU, then you find their project with the list.
Hope I could help, since took me quite some time to test and figure out how to get at least an acceptable result for me.
Cheers mate

1 Like

I am so sorry for late answer. Thank you very much it helps me so much.