we have a visualforce page which is exceeding 135 kb viewState limit. The page uses data of past five years from database with <apex:inputField>
in <apex:repeat>
and renders data.
Now is there any way to replace <apex:inputField>
with html input tag?
2 Answers
If your view state is getting exceeded then you should go with Javascript remoting. Records fetched with this methods are not included in view state at all.
Check example link
Before taking any action you should first establish whether the problem is with the view state that is:
- the non-transient fields of your controller
- a consequence of the apex tags
Both will increase as you present more rows, but 1) is much easier to fix than 2).
The View State Tab lets you establish this