Note that there are some explanatory texts on larger screens.

plurals
  1. PODatabind in knockoutjs doesn't work
    primarykey
    data
    text
    <p>Working with knockout js and breezejs i have a select control what is working in a strange way, this because sometimes the dropdown is populated fine and sometimes not( so my issue is with the property options: sites)</p> <p><strong>Layout:</strong></p> <pre><code> &lt;select data-bind="options: sites, optionsText: 'name', value: selectedSite, optionsCaption: 'All Sites'" class="input-medium"&gt;&lt;/select&gt; </code></pre> <p><strong>ViewModel:</strong></p> <pre><code>export var sites = ko.observableArray(); function loadSites() { return datacontext.getSites(sites, globalSettings.TreeViewObject, globalSettings.UserId, globalSettings.DeviceType); } </code></pre> <p>where datacontext is:</p> <pre><code>export var getSites = function (sitesObservable, treeViewObject,userId,deviceType) { var query = EntityQuery.from("GetSites") .withParameters({ userId: userId, businessObject: treeViewObject, deviceType: deviceType}); return manager.executeQuery(query) .then(querySucceeded) .fail(queryFailed); function querySucceeded(data) { if (sitesObservable) { sitesObservable(data.results); } log('Retrieved [Sites] from remote data source', data, true); } </code></pre> <p>}</p> <p>The execution of loadSites method come from the next method:</p> <pre><code>function loadLookupsAtRootLevel() { return Q.all([&lt;any&gt;loadLookup3(), &lt;any&gt;loadSites(), &lt;any&gt;loadLookup2(), &lt;any&gt;loadLookup3(), &lt;any&gt; loadLookup4()]); } </code></pre> <p>so i can all my lookups from </p> <pre><code>export function activate() { return loadLookupsAtRootLevel().then(loadRegistrations); </code></pre> <p>}</p> <p>from logging i can see that the collection is retrieved in a correct way but for some strange reason the control is not updated. Console in google chrome don't show any error. I don't how to debug the issue. any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload