Values referred in Visualforce

Values referred in Visualforce

Fields and Class variables are referred in Visualforce in the form of expressions as below.

{!ObjectName.FieldName}

{!ClassVariable}

<apex:page >
    <!-- {!ObjectName.fieldName} / {!classVariable} -->
    My Last Name: {!$User.FirstName} &nbsp; {!$User.LastName}
    My Org Name : {!$Organization.Name} <br/>
    Profile Name: {!$Profile.Name} <br/>
    
    <!-- Functions -->
    {!ISNULL('Ranjith')} <br/>
    {!IF(2 > 3, true, false)} <br/>
    {!IF(2 > 3, "not false", "not true")}    
</apex:page>

 

Related posts

Leave a Comment