function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hitesh Grover 7Hitesh Grover 7 

view state error

I am using apex:outputpanel in many places just to rerender. It increase my internal view state size to 80kb.
Suggest me the substitute for this:

<apex:outputPanel rendered="{!IF(abc == true, false, true)}">

here abc is get,set.
 
DeepthiDeepthi (Salesforce Developers) 

Hi Hitesh,

If you're running into internal view state issues (this typically only happens with pages with large collections), the best way to reduce it is to switch to using standard HTML components instead of apex components. Each apex component adds a certain amount of "weight" to the page (and some much more than others, i.e. lookup fields), so switching to non-apex components can help reduce the drag.

For example, replace
<apex:outputField value="{!Case.AccountId}"/>

With it's stripped equivalent (kind of)
<a href="{!URLFOR($Action.Account.View,Case.AccountId)}">{!Case.Account.Name}</a>

Also, refer the below post, https://salesforce.stackexchange.com/questions/4537/how-to-reduce-a-large-internal-view-state-what-is-in-the-internal-view-state 

Hope this helps you!
Thanks,
Deepthi