Hi Madhu, Just call the datatype in the visual force page. That should work. Example: //Apex Class class vf_controller { public string variable {get; set;} .... .... variable = 'Apple'; }
madhu, You need to define a public variable with getters and setters and use standard visualforce page input tags for that variable so that it gets binded to your visualforce page. Something like below:
How come all the answers here is the opposite. From what I understand the question is about from VF PAGE to CONTROLLER and all the answers only gave from CONTROLLER to VF PAGE.... it is easy to pass from CONTROLLER to VF PAGE but we beginner do not know how to PASS from VF PAGE back to CONTROLLER. Even when asked in the forum, we get the opposite answer. May I know whether is this even solving the question here already?
I have the same question as this post but it never gets answered at all
Hi Madhu,
Just call the datatype in the visual force page. That should work.
Example:
//Apex Class
class vf_controller {
public string variable {get; set;}
....
....
variable = 'Apple';
}
VF page:
<apex:inputField value = {!variable} />
Hope that helped!
You need to define a public variable with getters and setters and use standard visualforce page input tags for that variable so that it gets binded to your visualforce page. Something like below:
Let us know if this helps.
Thanks,
Lakshman
I have the same question as this post but it never gets answered at all