Checkbox callback and persistance
<p>I am trying to persist checkbox of a datatable item.</p>

<p>In simple terms, I need to persist this checkbox. Once it is checked, it needs to stay checked until it is unchecked via GUI.</p>

<pre><code>               &lt;p:column width="20"&gt;
              &lt;p:selectBooleanCheckbox value="#{datas.data_checkbox}" onchange="selectme(#{indexvar});"&gt;
                  &lt;p:ajax event="change"
                            async="true"
                            process="@form"
                            global="true"
                            update="data_tab"
                            listener="#{datasBean.updateDataProcess}"&gt;
                        &lt;f:setPropertyActionListener value="#{datas}" target="#{datasBean.selectedData}"/&gt;
                    &lt;/p:ajax&gt;
               &lt;/p:selectBooleanCheckbox&gt;
            &lt;/p:column&gt;


 public void updateDataProcess() {
    try {
    System.out.println("Update process is in progress...");

    if (selectedData.getData_process() == "true") {
        System.out.println("Process value is true");
        dataAccessObject.updateDataProcess(selectedData.getData_pk(),"1" );
    }
    if (selectedData.getData_process() == "false") {
        System.out.println("Process value is true");
        dataAccessObject.updateDataProcess(selectedData.getData_pk(),"0" );
    } 
    }
    catch (SocketTimeoutException ex) {
        ex.printStackTrace();
    } 
}

    public Integer updateDataProcess(String data_pk, String data_process) throws SocketTimeoutException {
    try {
        //&amp;setDataStatus=true&amp;dataPk=2&amp;dataStatus=2
        String updateDataProcessUrl = urlconstants.data_api_url + "/data.jsp?mrs_rest=true"
                + "&amp;setDataProcess=true"
                + "&amp;dataPk=" + data_pk
                + "&amp;dataProcess=" + data_process;

        System.out.println("json_call=" + updateDataProcessUrl);
        return Integer.parseInt(tools.getJSON(updateDataProcessUrl, 5000).trim());


    } catch (JsonSyntaxException ex) {
        ex.printStackTrace();
        return null;
    }
}
</code></pre>

<p>I have a JSON utility which can write integer to a data column in the database as well.</p>

<p>I am not sure if the checkbox callback is expecting boolean or not.</p>

<p>If it is, do I need to convert the boolean to integer and vice versa?</p>

<p>I do not seem to be able to persist this type of data.</p>