(Ektron CMS 400.Net,JavaScript)
by Jason Skowronek
on 09/27/2011
The Ektron knowledgebase contains an article, How To Define Data Lists In Content using smart forms and structured content. These content based lists can be used on smart form templates, html forms, or anywhere else you need structured lists.
When attempting to implement this custom logic, you may run into the following message/error in the "Item List" section of the Choices Field editor form:
No items exist in the list.
The problem lies in the /workarea/contentdesigner/choicesfield.js file. On line 750 (or so), is a hard-coded URL to the DataListSpec.xml file. Unfortunately, most browsers will cache xml files indefinitely or until the cache is forcefully cleared. Any updates made to the local version will not get loaded. So, new list source names will appear in List (source) drop down list, but the data items will not load properly.
A reasonably quick fix is to append a timestamp variable to the URL, forcing the browser to load the non-cached version:
var strDatalistUrl = "/WorkArea/ContentDesigner/DataListSpec.xml?ts=" + new Date().getMilliseconds(); // would be nice if not hardcoded
Hopefully this helps someone that runs into the same issue I was having.
Code on!