08-15-2012 08:53 PM
I've been developing a app using the awesome bbUI.js library, in this particular app I've used a control for the first time, the Pill Button control. One of the things that I need to make on this app is set the selected item dinamically, just like I can do with the Drop Down control .setSelectedItem(), but there's nothing in the docs detailing how to make it for Pill Buttons. Any ideas?
Solved! Go to Solution.
08-16-2012 10:51 AM
Disclaimer: I haven't used a Pill Button yet.
But it looks like it's just DIV elements. DropDown works on an extended Select element.
So I think you need to lookup the div with data-bb-type="pill-buttons", iterate through its sub-divs and change all data-bb-selected attributes.
08-16-2012 12:47 PM
If you are talking about smartphones, there isn't a way to do it... yet, but it's in the BBUI roadmap.
You can, however, change all the attributes manually... or think of a better option
08-16-2012 12:52 PM
Oh thanks very much for the information. I'll implement a Drop Down for the first version of the app then when the set method is implemented on the next versions I'll update the app to include the Pill Buttons.
01-23-2013 08:37 PM
Not sure if there's an official solution for this issue, but the following worked for me...
var pb1 = document.getElementById('pushbutton1');
You need both calls. I don't see any downside to this approach so far.