Oracle APEX radio groups as buttonsets
Warning: mysql_get_server_info(): Access denied for user ''@'localhost' (using password: NO) in /home/blucel/public_html/wp-content/plugins/xml-google-maps/xmlgooglemaps_dbfunctions.php on line 10
Warning: mysql_get_server_info(): A link to the server could not be established in /home/blucel/public_html/wp-content/plugins/xml-google-maps/xmlgooglemaps_dbfunctions.php on line 10

Buttonsets are sometimes appropriate to represent a choice of selections instead of radio buttons.
I think they look much better – especially when used for smaller lists.
Sub lists can be shown or hidden easily using dynamic actions in APEX 4.
This is what you need to do…
On page zero, add a piece of JavaScript like this:
1 2 3 4 5 6 | $(document).ready(function(){ //Buttonset radio groups $(".radio_group").find("br").remove(); $(".radio_group").buttonset(); }); |
What does this do?
First it removes the line break that Oracle adds when you create a radio button item in APEX. Next is runs the jqueryUI buttonset method on any items it finds with the class “radio_group”
If you want to have noth radio groups and buttonsets on the same page, then you could have added another class to your soon-to-be-buttonset item such as class=”myButtonset” then targeted it in your jquery code like this:
1 2 3 4 5 | $(document).ready(function(){ //Buttonset radio groups $(".myButtonset").find("br").remove(); $(".myButtonset").buttonset(); }); |
Hope this helps someone.
JqJunky
14 Feb, 2012
Great post, very useful, thanks.