Why is it that this works:
var seg = new sap.m.SegmentedButton();
panel.addContent(seg);
panel.onclick = function() { seg.addButton(new sap.m.Button({text: "text"})); };
But this doesn't:
var seg = new sap.m.SegmentedButton();
panel.addContent(seg);
panel.onclick = function() { seg.addItem(new sap.m.SegmentedButtonItem({text: "item"})); };
In the second case only the first item shows up, while the first example works perfectly (I can add as many as I want).
Add comment