I have the following Visual force page:
<apex:form id="mainForm" >
<apex:actionFunction name="renderConsolePage" action="{!renderConsolePage}" rerender="out1"/>
<apex:pageMessages id="showmsg"/>
<apex:outputPanel id="out1">
<apex:outputPanel id="consoleOutput">
<apex:pageblock id="pbConsole" mode="inlineEdit">
<apex:pageblockbuttons >
<apex:commandbutton title="{!$Label.Save_Button_Label}"
action="{!saveCustomObject}"
rerender="mainForm, showmsg"
value="{!$Label.Save_Button_Label}" />
</apex:pageblockbuttons>
<apex:pageblocksection id="pbsConsole" columns="2">
<apex:repeat value="{!ListOfFields}" var="fld">
<apex:inputfield required="{!fieldMap [fld]}" value="{!customObject[fld]}" />
</apex:repeat>
</apex:pageblocksection>
</apex:pageblock>
</apex:outputPanel>
</apex:outputPanel>
</apex:form>
This is a Dynamic page that renders input fields for a Custom Object, these fields can be Text, DateTime, Picklists, checkboxes etc.
The ListOfFields is a List of the API names that are referenced in the customObject which is the custom Object that has been retrieved using a regular dynamic SOSL query.
What this page does is present the input fields and allow for the user to enter the values and save the custom object (it also updates in the same manner). All the fields are shown as expected and saving works as expected.
My issue is that for the Checkboxes I can see that the values are saved in the custom object (when I inspect this on the object level), but when I do a page refresh or simply log out and return, the checkboxes are blank (even if they should be checked).
All the other values for Text fields, lookups, picklists etc. are shown as expected but for checkboxes they are unchecked, regardless of the value that was entered before clicking save.
I have tried to only reference one field (a checkbox) and instead of having apex:inputField, using apex:inputCheckbox, but still the same abscence of the correct value (even if I can see that before the page loads (the query) holds the correct value of "true" and that it is shown as correct on the custom object record.
I have no idea if this is something really simple I am missing or similar, I have not found any known issues regarding this as well and would appreciate any help.
Ciao!