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
ssfdcssfdc 

Getter overrides Setter and runs twice

I have a custom Getter and Setter in my Code, this populates a <apex:inputTextArea value="{!emailContent}"/>, Anytime I call an action from my command button the order of execution is, Get, Set, Get, the problem here is that the Set method with the new content is always being overwritten, Any help would bre great I'm sure its something I'm overlooking from lack of custom Get and Set implementations.

Thanks.

<apex:form>
   <apex:inputTextArea styleClass="ckeditor" richtext="false" value="{!emailContent}"/>
   <apex:commandButton action="{!sendEmail}"  value="Send"/>
</apex:form>

public String emailContent {
        get {
            System.debug('GETTER');
           
            // Add some changes to emailContent
            return emailContent;  
        }
        set{
            System.debug('SETTER');
            emailContent = value;
        }   
    }
ssfdcssfdc
Bump :)