Working Example of jQuery Caph-list Methods for Tizen TV Web App

Original Created Feb 22, 2018 | Regeneration Apr 22, 2026

I'm developing a single-page web application for Tizen TV where I use multiple divs that I hide/show to simulate page changes. This approach is necessary because I'm using a NaCl module that's instantiated on one HTML page and shouldn't be reinitialized with each page change.

The specific issue I'm facing involves overlapping lists in caph-list. For example:

  1. Initial array: list1 = ["first","second","third"]
  2. First render works fine
  3. After pressing RETURN on the remote, I go back one div and hide the current div
  4. When I update the array to list1 = ["fourth","fifth"] and return to the caph-list div, the new entries overlap with the previous ones

I understand I should use reload() to solve this, but I'm having trouble implementing it correctly to update the caph-list view when the array contents change. Has anyone successfully used this method to replace caph-list contents? Could you share your implementation code?

Reference materials:

Problem Understanding

The user is experiencing content overlap in caph-list when dynamically updating the data source array. This occurs because the list isn't properly refreshed when returning to a previously visited view.

Solution Methods

  1. Proper List Refresh: Ensure you're correctly using the reload() method to refresh the list when data changes
  2. View Management: Implement proper view lifecycle management to handle list updates when showing/hiding divs

Code Examples

// Initialize your caph-list
var myList = new caph.list({
    data: ["first", "second", "third"],
    // other configuration options
});

// When updating the list data
function updateList(newData) {
    myList.data = newData;  // Update the data source
    myList.reload();        // Refresh the list view
}

// Example usage:
updateList(["fourth", "fifth"]);

Additional Tips

  • Make sure to call reload() after any data changes
  • Consider using view state management to track when lists need refreshing
  • For more complex scenarios, you might need to implement a custom refresh mechanism

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.