Salesforce - Developer - Visualforce - Expression

salesforce-developer-visualforce

https://trailhead.salesforce.com/force_com_dev_beginner/visualforce_fundamentals/visualforce_variables_expressions

// Salesforce - Developer - Visualforce - Expression:

Visualforce pages can display data retrieved from the database or web services, 
data that changes depending on who is logged on and viewing the page, and so on. 
This dynamic data is accessed in markup through the use of global variables, 
calculations, and properties made available by the page’s controller. Together 
these are described generally as Visualforce expressions. Use expressions for 
dynamic output or passing values into components by assigning them to attributes.

A Visualforce expression is any set of literal values, variables, 
sub-expressions, or operators that can be resolved to a single value. Method 
calls aren’t allowed in expressions.

The expression syntax in Visualforce is: {! expression }

Anything inside the {! } delimiters is evaluated and dynamically replaced when 
the page is rendered or when the value is used. Whitespace is ignored.

The resulting value can be a primitive (integer, string, and so on), a Boolean, 
an sObject, a controller method such as an action method, and other useful 
results.

Expressions have many uses, and are often used to provide values for attributes 
on Visualforce components.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License