function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BrokenBirdBrokenBird 

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>

 

 

 

 

Message Edited by BrokenBird on 05-23-2009 11:15 AM
Message Edited by BrokenBird on 05-23-2009 11:16 AM
Best Answer chosen by Admin (Salesforce Developers) 
Ken_KoellnerKen_Koellner

Look up "apex:inputHidden" in the VF manual.

 

All Answers

Ken_KoellnerKen_Koellner

Look up "apex:inputHidden" in the VF manual.

 

This was selected as the best answer
BrokenBirdBrokenBird
thank you! You are my new best friend!! :manhappy:
rcravenrcraven

You could also try adding the following CSS style property.

 

style="display:none;"