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
CRM93CRM93 

how to assign a value fetched from the constructo​r to a visualforc​e 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 

Bhawani SharmaBhawani Sharma

You can create a new variable for that value which you are getting from external system and set it in constructor. On VF page you can directly use it like

public String externalSystemValue {get; set;}

//In Constructor externalSystemValue = some value;

Use this variable on page
<apex:outputText value="{!externalSystemValue}" />

 

 

wixxeywixxey

Create a variable within the class with get; set; .. Within the constructor assign the value to this variable ... Now you can use this variable in your apex page