Ok I do not like it, but it works:
1) In my JSON, I only pass the function name:
<ul data-role="listview" data-create="false" class="template" data-config='{ "type":"listview", "data":"getRetailers", "custom_classes":["embedded_filter updateResults f-875","nMT pickList f-875 widget_listview","fn",""], "lib":"static_listview.html", "tmp":"tmp_listview_inset", "lang":"locale_search", "text":"buildRetailers", ... }'></ul>
2) Then in my script I add buildRetailers to my dynoData module:
var dynoData = { ... buildRetailers: function (inv) { return inv.company+', '+ inv.zip + ', '+ inv.city; }, ... }
3) And call it from my listview row builder:
.... listItem = listItem.replace( widget.options.re_theme, li_theme ); listItem = listItem.replace( widget.options.re_iconpos, li_iconpos ); listItem = listItem.replace( widget.options.re_icon, li_icon ); // call the function to return the list item text listItem = listItem.replace( widget.options.re_text, dynoData[ li_text ](inv) );
Therefore, I cannot pass a function string in the JSON configuration, so I need to add a function to build what I need. If someone knows the best way, write. I will check and verify.