Reputation: 56249
I need to create something similar what we have in desktop app but it need to be on site.
All theses panels are objects in Java with properties type, number and name. I have same objects in my array ( json format and I create array of objects with dojo.declare). How to create for one object this thing
How to create this ? Can anybody help ?
Upvotes: 0
Views: 198
Reputation: 14605
var container = dojo.create("div");
dojo.forEach(array, function(obj) {
var wrapper = dojo.create("div", null, container);
var topline = dojo.create("div", null, wrapper);
var bottomline = dojo.create("div", {"class":"IDField"}, wrapper);
var leftcell = dojo.create("div", {"class":"LetterField"}, topline);
var rightcell = dojo.create("div", {"class":"NumField " + (obj.NumField === 0 ? "Gray" : "Yellow")}, topline);
leftcell.innerText = obj.......
:
:
});
Upvotes: 2