You need to sign in to do that
Don't have an account?
Anjaneylu
setter and getter methods
hi,
i am new to salesforce, i want to know the set and get method ...
what would happen when we declare the variables like this..
please kindly help me.. please.........
public Cat3__c cat {get;set;}
public String message {get;set;}
i am new to salesforce, i want to know the set and get method ...
what would happen when we declare the variables like this..
please kindly help me.. please.........
public Cat3__c cat {get;set;}
public String message {get;set;}
Like
Setter Methods:
<apex:inputText value= "{!message }" />
Then when you enter value inside it then it will automaticaly set in controller message like in your public String message {get;set;}
Getter Method;
When you declare value like message = 'test'; In your constructor or elsewhere in your controller then visualforce page auomaticaly get the value of message.
<apex:outputText value= "{!message }" />
Please follow the below link for more info on
http://blog.jeffdouglas.com/2009/01/13/apex-search-with-checkbox-results/
http://blog.jeffdouglas.com/2011/01/17/passing-values-to-javascript-from-apex-controller-method/
Please let me know if this helps you.
Best Regards
Naga Kiran
For more info: http://www.salesforce.com/docs/developer/pages/Content/pages_controller_methods.htm
http://salesforce.stackexchange.com/questions/9167/getter-setter-confused
Hope this Helps
Thank you
BLearn - Sai