Vandevelde Jan

Certified Salesforce Consultant

For Developers

A lesser known Visualforce pageBlock attribute called “mode”

 

Well pageBlock comes with an attribute that is not really well documenten called “mode”.

This value determines whether lines are drawn separating field values. Possible values are:

  • “detail”, in which data is displayed to the user with colored lines
  • “edit”, in which data is displayed to the user without field lines. If not specified, this value defaults to “detail”. These lines have nothing to do with requiredness, they are merely visual separators, that make it easier to scan a detail page.
  • “maindetail”, in which data is displayed to the user with colored lines and a white background, just like the main detail page for records

Here a screenshot of the 3 modes:

 

“detail” (default if you don’t use mode attribute):

 

 

“edit”

 

 

“MainDetail”

 

 

More info can be found on this attribute in the official developer documentation: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlock.htm?search_text=pageblock

Add comment


Security code
Refresh

On Twitter

Contact Info

Jan Vandevelde

Ninoofsesteenweg 42

9450 Denderhoutem

België

Mobile: +32 (0) 472 58 47 67

 

Email Address: contact@vandeveldejan.be

VAT BE 0882 025 057

Certifications