You need to sign in to do that
Don't have an account?
ssfdc
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;
}
}
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;
}
}
ssfdc
Bump :)