Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8406285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:04:06+00:00 2026-06-09T23:04:06+00:00

I have the following html that is bound to an object containing id and

  • 0

I have the following html that is bound to an object containing id and status. I want to translate status values into a specific color (hence the converter function convertStatus). I can see the converter work on the first binding, but if I change status in the binding list I do not see any UI update nor do I see convertStatus being subsequently called. My other issue is trying to bind the id property of the first span does not seem to work as expected (perhaps it is not possible to set this value via binding…)

HTML:

<span data-win-bind="id: id">person</span>
<span data-win-bind="textContent: status converter.convertStatus"></span>

Javascript (I have tried using to modify the status value):

// persons === WinJS.Binding.List
// updateStatus is a function that is called as a result of status changing in the system

function updateStatus(data) {
    persons.forEach(function(value, index, array) {
        if(value.id === data.id) {
            value.status = data.status;
            persons.notifyMutated(index);
        }
    }, this);
}

I have seen notifyMutated(index) work for values that are not using a converter.

Updating with github project

Public repo for sample (not-working) – this is a really basic app that has a listview with a set of default data and a function that is executed when the item is clicked. The function attempts to randomize one of the bound fields of the item and call notifyMutated(…) on the list to trigger a visual updated. Even with defining the WinJS.Binding.List({ binding: true }); I do not see updates unless I force it via notifyReload(), which produces a reload-flicker on the listview element.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:04:08+00:00Added an answer on June 9, 2026 at 11:04 pm

    To answer your two questions:

    1) Why can’t I set id through binding?

    This is deliberately prevented. The WinJS binding system uses the ID to track the element that it’s binding to (to avoid leaking DOM elements through dangling bindings). As such, it has to be able to control the id for bound templates.

    2) Why isn’t the converter firing more than once?

    The Binding.List will tell the listview about changes in the contents of the list (items added, removed, or moved around) but it’s the responsibility of the individual items to notify the listview about changes in their contents.

    You need to have a data object that’s bindable. There are a couple of options:

    • Call WinJS.Binding.as on the elements as you add them to the collection
    • Turn on binding mode on the Binding.List

    The latter is probably easier. Basically, when you create your Binding.List, do this:

    var list = new WinJS.Binding.List({binding: true});
    

    That way the List will call binding.as on everything in the list, and things should start updating.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following HTML that pops up a window when I click the
I have the following HTML that can appear but only one at a time:
I have the following html/css that is causing problems in Firefox 1.5 and 2,
I have the following html code: I saw that for Watir-webdriver the Watir::Image.file_size method
I have a following problem, I have HTML form that uploads a file with
I have a text file of HTML that includes the following marker set for
So I have some html that looks like the following: <div class='something unknown' id='something_unknown_1'>
i have the following problem with that code in my html tag: <div id=searchbar><input
I have a simple html form that looks like the following <form action=search.php method=get>
I have a single .html file that looks similar to the following: <div id=myPage

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.