Changing the values of a radio button programatically with jQuery

Solution 1:

You will need to set the checked attribute instead, like

document.getElementById("formCheltuialaBuget:radioTVA:0").value = false;
document.getElementById("formCheltuialaBuget:radioTVA:1").value = true;

See

document.getElementById("formCheltuialaBuget:radioTVA:0").value = false;
document.getElementById("formCheltuialaBuget:radioTVA:1").value = true;
<table id="formCheltuialaBuget:radioTVA" role="presentation" class="ui-selectoneradio ui-widget">
    <tbody>
        <tr>
            <td>
                <div class="ui-radiobutton ui-widget">
                    <div class="ui-helper-hidden-accessible"><input id="formCheltuialaBuget:radioTVA:0"
                            name="formCheltuialaBuget:radioTVA" type="radio" value="true"
                            onchange="PrimeFaces.ab({s:&quot;formCheltuialaBuget:radioTVA&quot;,e:&quot;change&quot;,p:&quot;formCheltuialaBuget:radioTVA&quot;,u:&quot;formCheltuialaBuget:tvaelig formCheltuialaBuget:totalELigg formCheltuialaBuget:publicBuget formCheltuialaBuget:tvanonelig formCheltuialaBuget:contributie&quot;,onst:function(cfg){document.body.style.cursor='wait';},onco:function(xhr,status,args){document.body.style.cursor='default';}});"
                            wtx-context="F08D1A11-AFD1-4F6C-80FC-F02488900FAB"></div>
                    <div class="ui-radiobutton-box ui-widget ui-corner-all ui-state-default"><span
                            class="ui-radiobutton-icon ui-icon ui-icon-blank ui-c"></span></div>
                </div>
            </td>
            <td><label for="formCheltuialaBuget:radioTVA:0">Da</label></td>
            <td>
                <div class="ui-radiobutton ui-widget">
                    <div class="ui-helper-hidden-accessible"><input id="formCheltuialaBuget:radioTVA:1"
                            name="formCheltuialaBuget:radioTVA" type="radio" value="false"
                            onchange="PrimeFaces.ab({s:&quot;formCheltuialaBuget:radioTVA&quot;,e:&quot;change&quot;,p:&quot;formCheltuialaBuget:radioTVA&quot;,u:&quot;formCheltuialaBuget:tvaelig formCheltuialaBuget:totalELigg formCheltuialaBuget:publicBuget formCheltuialaBuget:tvanonelig formCheltuialaBuget:contributie&quot;,onst:function(cfg){document.body.style.cursor='wait';},onco:function(xhr,status,args){document.body.style.cursor='default';}});"
                            checked="checked" wtx-context="3412B572-AE39-4A78-B34C-87A13760C805"></div>
                    <div class="ui-radiobutton-box ui-widget ui-corner-all ui-state-default ui-state-active"><span
                            class="ui-radiobutton-icon ui-icon ui-icon-bullet ui-c"></span></div>
                </div>
            </td>
            <td><label for="formCheltuialaBuget:radioTVA:1">Nu</label></td>
        </tr>
    </tbody>
</table>