You need to sign in to do that
Don't have an account?

how to assign a value fetched from the constructor to a visualforce field
on executing a class I am getting the value from external system , that value is in the constructor .... but i need to assign that particular value to a visualforce page field
Thanks in advance
You need to create one property in apex class
for e.g.
public with sharing class SampleClass()
{
public string ExternalValue{get; set;}
public SampleClass()
{
// Your code to fetch value from external system.
// suppose "test" is the value returned from your external system.
string s = 'test';
ExternalValue = s;
}
}
Now you can bind "ExternalValue" to the VF page.
http://boards.developerforce.com/t5/Visualforce-Development/how-to-assign-a-value-fetched-from-the-constructo-r-to-a/td-p/603733