In JSF, to have your selectOneRadio group split is so normal and so useful many times, but with this usefulness, a new tricky problem comes up. Consider the next scenario:

<h:form id="form1">
    ...
    <h:selectOneRadio value="#{BackingBean.value1}">
       <f:selectItem itemLabel="Make this default" itemValue="#{true}" />
    </h:selectOneRadio>
    ...
</h:form>

and in the same page you have another form, but both radios share the same logic.

<h:form id="form2">
    ...
    <h:selectOneRadio value="#{BackingBean.value2}">
        <f:selectItem itemLabel="Make this default" itemValue="#{true}" />
    </h:selectOneRadio>
    ...
</h:form>

One of the two radios should be checked, and I know it’s not working.
I created a JavaScript function using jQuery 1.3.2.
Check it out:

function uncheckSameRadio(radio, id) {
    if (radio.name.lastIndexOf(":") != -1 /* jsf mode */) {
        jQuery('input[type="radio"]').each(function() {
            var currentFull = jQuery(this).attr('name');
            var currentName = currentFull.substring(currentFull.lastIndexOf(":")+1);

            if (currentName.substring(0, id.length)==id)
                jQuery(this).attr('checked', false);
        });
    } else {
        jQuery('input[type="radio"][id^="'+id+'"]').each(function() {
            jQuery(this).attr('checked', false);
        });
    }
    radio.checked = true;
}

This function takes two arguments, the first one is the checked radio button, and the second one is the grouping name I gave for my radios to synchronize checking between each other. In order to get this function working you have to name your radio buttons with the same id prefix, for example myGroup1, myGroup2.
and when calling the function you can pass the shared prefix myGroup.
Here’s the code of function invoking:

<h:selectOneRadio id="myGroup1" value="#{BackingBean.value1}" onClick="uncheckSameRadio(this, 'myGroup')">
       <f:selectItem itemLabel="Make this default" itemValue="#{true}" />
</h:selectOneRadio>

in the same manner the second radio would be like the next:

<h:selectOneRadio id="myGroup2" value="#{BackingBean.value2}" onClick="uncheckSameRadio(this, 'myGroup')">
       <f:selectItem itemLabel="Make this default" itemValue="#{true}" />
</h:selectOneRadio>

This way definitely solved my trouble, it even works with normal HTML radio buttons.
I also implemented the above function for checkboxes, here’s the code:

function uncheckSameCheckbox(checkbox, id) {
    if (checkbox.name.lastIndexOf(":") != -1 /* jsf mode */) {
        jQuery('input[type="checkbox"]').each(function() {
            var currentFull = jQuery(this).attr('name');
            var currentName = currentFull.substring(currentFull.lastIndexOf(":")+1);

            if (currentName.substring(0, id.length)==id)
                jQuery(this).attr('checked', false);
        });
    } else {
        jQuery('input[type="checkbox"][id^="'+id+'"]').each(function() {
            jQuery(this).attr('checked', false);
        });
    }
    checkbox.checked = true;
}