Visualforce components contribute to the internal element of the view state. A page with a large number of components, or with a repeating element that contains a number of components, may consume a significant amount of the view state.
In this recipe we will create two Visualforce pages:
The first will iterate a collection of opportunity records using an
<apex:pageBlockTable />
repeater component with nested standard components for columns and input fieldsThe second will iterate a collection of opportunity records using a regular HTML
<table>
element
We will then use the View State Inspector to examine the overall size and contents of the view state for each page to see the impact that storing the records has.
This recipe requires that you have enabled the View State Inspector, as detailed in the Reducing view state size 1- the transient keyword recipe in this chapter.