vj-app-arch-3
Version:
Create a list view from Comma seprated string
26 lines (23 loc) • 639 B
JavaScript
exports.test_method = function() {
console.log("Create a list view from Comma seprated string");
}
exports.gen_list_view = function(list_view_str) {
var lists=[];
if (list_view_str.length>0) {
lists = list_view_str.split(",");
}
console.log(lists);
console.log("Generating List View");
list_view = "<ul>";
console.log("No of records found:" + lists.length);
if(lists.length>0){
for(var i=0; i<lists.length; i++){
list_view += "<li>";
list_view += lists[i];
list_view += "</li>";
}
}
list_view += "</ul>";
console.log("Generated List View");
return list_view;
}