I'm using custom_object on the Visualforce Page
and showing the fields based on the user selection on the picklist, even though I hide the fields the value is still saving to the object, how do I not save the fields in the object which is not rendered/hide?
To give you an example here is how I'm not rendering the field based on the condition:
<apex:inputField value="{!Employee__c.WeekDay__c}" rendered="{!isTransSelected==true}" />
I'm using the following Save action:
public PageReference Save()
{
try
{
system.debug('updating: ' + employeeObj);
update employeeObj;
}
catch (exception e){
ApexPages.addMessages(e);
}
return null;
}
Or should I explicitly defined what fields needs to be updated?
true
orfalse
. You can directly writerendered="{!isTransSelected}"
.