You need to sign in to do that
Don't have an account?
Context not kept between calls
I have a special form, in which there are no inputfield, only a table with radio buttons, I actually set the field value based on the radio button selected. (See image)
So if leave the InputField box (see top row), then the context is kept and I can save, however, If they are not included the context is not kept and saving saves the old values.
public myCriteriaScorecardExtension(ApexPages.StandardController controller)
{
baseController = controller;
scorecard = (Criteria_Scorecard__c) baseController.getRecord();
...
including this is the only way the context is kept, if I hide them with rendered="false" it stop working, if I use outputfield instead of inputfield, it also stop working.
<apex:pageblock mode="edit" id="PB1">
<apex:inputField value="{!scorecard.Question1__c}" rendered="true" />
<apex:inputField value="{!scorecard.Question2__c}" rendered="true"/>
<apex:inputField value="{!scorecard.Question3__c}" rendered="true"/>
<apex:inputField value="{!scorecard.Question4__c}" rendered="true"/>
<apex:inputField value="{!scorecard.Question5__c}" rendered="true"/>
<apex:inputField value="{!scorecard.Question6__c}" rendered="true"/>
</apex:pageblock>
Look up "apex:inputHidden" in the VF manual.
All Answers
Look up "apex:inputHidden" in the VF manual.
You could also try adding the following CSS style property.
style="display:none;"