Monday, December 19, 2016

Visualforce - Beyond Basics Series 27 - style using mode in pageblock

How to bring standard styling in VF Pages ?

There few ways to bring the standard styling to the custom visualforce pages pretty easily. They are

  1.  using tabStyle in page/pageblock
  2.  using detail tag
  3.  using chatter tag
  4.  using mode in pageblock



Where it will be useful ?

When one needs to develop a page that mimics the standard detail page, they should above techniques to bring the same styling as the standard pages. Also, it will be useful in inline visualforce pages embedded in page layouts, otherwise, it will look weird with other standard sections in the page.


How to use it ?

There's an attribute in pageblock called mode, which accept values like detail, maindetail, Edit, InlineEdit for giving different behaviour to the standard styling.

Where is the code ?

Here, i have illustrated different modes for the pageblock & demonstrated how it will be visible in the page.


No comments:

Post a Comment

Thanks for reading my blog !